Improved sanitation for content pasted from OpenOffice
authorAlexander Ebert <ebert@woltlab.com>
Wed, 28 Oct 2015 12:01:41 +0000 (13:01 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 28 Oct 2015 12:01:41 +0000 (13:01 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

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