summaryrefslogtreecommitdiff
path: root/addons/web_editor/static
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2015-12-10 15:50:10 +0100
committerNicolas Lempereur <nle@odoo.com>2015-12-10 15:53:07 +0100
commit893fbc05535f6e19a4185d4a5d7cf703a44bdcd0 (patch)
tree74bb2e6ec539510061c70940de5be54d6fbb385a /addons/web_editor/static
parent87090c1b8b55363efd14abf30ea11da3706c4a00 (diff)
[FIX] web_editor: keep inline editor line spacing
opw-657955
Diffstat (limited to 'addons/web_editor/static')
-rw-r--r--addons/web_editor/static/src/js/backend.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index 0cd7541c7e2..17a2df31c6e 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -97,8 +97,8 @@ var FieldTextHtmlSimple = widget.extend({
if (value.match(/^\s*$/)) {
value = '<p><br/></p>';
} else {
- value = "<p>"+value.split(/<br\/?>/).join("</p><p>")+"</p>";
- value = value.replace('<p><p>', '<p>').replace('</p></p>', '</p>');
+ value = "<p>"+value.split(/<br\/?>/).join("<br/></p><p>")+"</p>";
+ value = value.replace(/<p><\/p>/g, '').replace('<p><p>', '<p>').replace('</p></p>', '</p>');
}
return value;
},