The check for OpenOffice/LibreOffice was too restrictive
authorAlexander Ebert <ebert@woltlab.com>
Thu, 4 Feb 2016 21:22:14 +0000 (22:22 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 4 Feb 2016 21:22:22 +0000 (22:22 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index f3b5c70660b89cd34e18a1a3022ee44537e457ef..4c59bf41fd5245a010a16ce536da46e502bbfde0 100644 (file)
@@ -1570,8 +1570,9 @@ 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) || /style="margin-bottom: 0cm"/.test(html)) {
+                       // some fixes for paste from Microsoft Word / OpenOffice / LibreOffice
+                       if (/<p class="MsoNormal/.test(html) || /margin-bottom: 0cm/.test(html)) {
+                               console.debug("hit");
                                // fix weird newlines
                                html = html.replace(/([^>\s])\n([^<\s])/g, '$1 $2');