summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.snippets.animation.js
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2017-08-02 17:31:06 +0200
committerLucas Perais (lpe) <lpe@odoo.com>2017-08-03 09:29:14 +0200
commit8749410b1033ddec1207ce1db42d1889a0d2ea33 (patch)
treee4a54988a0692e0a3fe979cd34de9ec834087f80 /addons/website/static/src/js/website.snippets.animation.js
parent4f5b0463aef7fa6e85ed004c522eed8b72551685 (diff)
[FIX] website: correctly renders iframe for videos
Before this commit, the iframe tags were sanitized as the should, but never spawn back from JS. Now, the iframe is actually created opw 750830 Closes #18643
Diffstat (limited to 'addons/website/static/src/js/website.snippets.animation.js')
-rw-r--r--addons/website/static/src/js/website.snippets.animation.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js
index 5de8d9ce1ac..644b6b3aa1c 100644
--- a/addons/website/static/src/js/website.snippets.animation.js
+++ b/addons/website/static/src/js/website.snippets.animation.js
@@ -134,8 +134,9 @@ animation.registry.media_video = animation.Class.extend({
if (!this.$target.has('.media_iframe_video_size').length) {
var editor = '<div class="css_editable_mode_display">&nbsp;</div>';
var size = '<div class="media_iframe_video_size">&nbsp;</div>';
- this.$target.html(editor+size+'<iframe src="'+_.escape(this.$target.data("src"))+'" frameborder="0" allowfullscreen="allowfullscreen"></iframe>');
+ this.$target.html(editor+size);
}
+ this.$target.html(this.$target.html()+'<iframe src="'+_.escape(this.$target.data("src"))+'" frameborder="0" allowfullscreen="allowfullscreen"></iframe>');
},
});