From 4687fa61b36ea5febe321a748a5212e22f105699 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 16 Nov 2016 15:46:45 +0100 Subject: [PATCH] Fixed handling of empty lines --- .../install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js index 17e789a2a3..ab3b26466b 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js @@ -44,7 +44,7 @@ $.Redactor.prototype.WoltLabClean = function() { var br = p.lastElementChild; if (br && br.nodeName === 'BR') { // check if there is only whitespace afterwards - if (br.nextSibling && br.nextSibling.textContent.match(/^[\s\u200B]+$/)) { + if (br.nextSibling && br.nextSibling.textContent.replace(/[\r\n\t]/g, '').match(/^\u200B+$/)) { var newP = elCreate('p'); newP.innerHTML = '
'; p.parentNode.insertBefore(newP, p.nextSibling); -- 2.20.1