diff --git a/addons/web_editor/static/src/js/translator.js b/addons/web_editor/static/src/js/translator.js index f243a878d2c..cac85b7a0ff 100644 --- a/addons/web_editor/static/src/js/translator.js +++ b/addons/web_editor/static/src/js/translator.js @@ -177,6 +177,10 @@ var Translate = Widget.extend({ }, rte_changed: function (node) { var $node = $(node); + $node.find("p").each(function () { // remove

element which might have been inserted because of copy-paste + var $p = $(this); + $p.after($p.html()).remove(); + }); var trans = this.getTranlationObject($node[0]); $node.toggleClass('o_dirty', trans.value !== $node.html().replace(/[ \t\n\r]+/, ' ')); this.$('button[data-action=save]').prop('disabled', !$('.o_editable.o_dirty').length);