From: Alexander Ebert Date: Fri, 16 Oct 2015 19:53:00 +0000 (+0200) Subject: Fix for pasting from Word was too defensive, removed bogus anchors X-Git-Tag: 2.1.8~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9eacf6ef751890dca5bf7a202e35231f299bc227;p=GitHub%2FWoltLab%2FWCF.git Fix for pasting from Word was too defensive, removed bogus anchors --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index f8ca8804cb..37425b840e 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -1570,9 +1570,13 @@ RedactorPlugins.wbbcode = function() { }); html = html.replace(/<\/h[1-6]>/g, '[/size]'); - // fix weird newlines found when pasting from Microsoft Word - if (/

/.test(html)) { + // some fixes for paste from Microsoft Word / OpenOffice + if (/

/g, ''); } // fix empty paragraphs when pasting from Microsoft Word