From 9b69cd2aca33b24e10c78dda03db00ec923a7c7d Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 8 Jul 2020 16:20:19 +0900 Subject: [PATCH] Fix empty lines being removed after saving --- modules/editor/skins/simpleeditor/js/simpleeditor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/editor/skins/simpleeditor/js/simpleeditor.js b/modules/editor/skins/simpleeditor/js/simpleeditor.js index d08bf0882..118e35e03 100644 --- a/modules/editor/skins/simpleeditor/js/simpleeditor.js +++ b/modules/editor/skins/simpleeditor/js/simpleeditor.js @@ -36,7 +36,8 @@ str = String(str); str = str.replace(//g, ''); str = str.replace(/<\/?(\?xml|meta|link|font|style|script|noscript|frame|noframes)\b[^>]*?>/ig, ''); - str = str.replace(//g, '').replace(/(<\/?)div(\W)/g, '$1p$2'); + str = str.replace(//g, '').replace(/(<\/?)div(\W)/g, '$1p$2'); + str = str.replace(/

\s*<\/p>/g, '

 

'); return str; };