Fixed detection of content pasted from Microsoft Word
authorAlexander Ebert <ebert@woltlab.com>
Tue, 21 Feb 2017 18:10:23 +0000 (19:10 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 21 Feb 2017 18:10:23 +0000 (19:10 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 000b74f1b651e499e685361f9c0e294372137bd7..fdd367dffebaa9c1d55b80ba01e0dc94777d4f1d 100644 (file)
@@ -1612,7 +1612,7 @@ RedactorPlugins.wbbcode = function() {
                        html = html.replace(/<\/h[1-6]>/g, '[/size]');
                        
                        // some fixes for paste from Microsoft Word / OpenOffice / LibreOffice
-                       if (/<p class="MsoNormal/.test(html) || /margin-bottom: 0cm/.test(html)) {
+                       if (/<p class="Mso(?:Normal|NoSpacing)/.test(html) || /margin-bottom: 0cm/.test(html)) {
                                // fix weird newlines
                                html = html.replace(/([^>\s])\n([^<\s])/g, '$1 $2');