diff options
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/translator.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/translator.js b/addons/web_editor/static/src/js/translator.js index 4fd9825567f..bc431f3ba55 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 <p/> 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]+/, ' ')); }, |
