diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/text.js b/addons/web_editor/static/src/js/wysiwyg/plugin/text.js index 2b7d10d02fd..f770b8121bf 100644 --- a/addons/web_editor/static/src/js/wysiwyg/plugin/text.js +++ b/addons/web_editor/static/src/js/wysiwyg/plugin/text.js @@ -679,7 +679,12 @@ var TextPlugin = AbstractPlugin.extend({ */ _removeIllegalClipboardElements: function ($clipboardData) { var root = true; - $clipboardData = $clipboardData.not('meta').not('style').not('script'); + $clipboardData.each(function (i, node) { + var tag = node.tagName; + if (tag === 'meta' || tag === 'style' || tag === 'script') { + $(node).remove(); + } + }); var $badNodes = this._filterIllegalClipboardElements($clipboardData); do {