[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
This commit is contained in:
Nicolas Lempereur 2015-09-18 09:41:32 +02:00
parent 543c9fde83
commit 3c39b62bce
1 changed files with 1 additions and 1 deletions

View File

@ -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 = $('<div />').text(this.nodeValue).html();