From 3c39b62bce5880a11a005f9571b68fb2c825033b Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Fri, 18 Sep 2015 09:41:32 +0200 Subject: [PATCH] [FIX] website: escaping and external iframe jQuery has a special behaviour when using .contents() over an iframe object. This caused an error for escaping when saving the page with an iframe content of an external domain. introduced by 8c77c711 opw-649570 --- addons/website/static/src/js/website.editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 212014feb2a..1a0d58f0aff 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -426,7 +426,7 @@ // escape text nodes for xml saving var escaped_el = $el.clone(); var to_escape = escaped_el.find('*').addBack(); - to_escape = to_escape.not(to_escape.filter('script,style,[data-oe-model][data-oe-model!="ir.ui.view"]').find('*').addBack()); + to_escape = to_escape.not(to_escape.filter('object,iframe,script,style,[data-oe-model][data-oe-model!="ir.ui.view"]').find('*').addBack()); to_escape.contents().each(function(){ if(this.nodeType == 3) { this.nodeValue = $('
').text(this.nodeValue).html();