Fixed newline handling for centered content inside tables
authorAlexander Ebert <ebert@woltlab.com>
Sun, 20 Aug 2017 14:33:31 +0000 (16:33 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 20 Aug 2017 14:33:31 +0000 (16:33 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index d8b768a2b8f141323cb9e4bd988895fba81e3323..edfeafe41d4c9ea8358a258539bb0c088f8f6580 100644 (file)
@@ -1260,7 +1260,7 @@ RedactorPlugins.wbbcode = function() {
                                                        if ($line.match(/<\/p>$/) && ($i + 1 < $length)) {
                                                                data += $line;
                                                                
-                                                               if ($.trim($tmp[$i + 1]).indexOf('<p') === 0) {
+                                                               if (!$.trim($tmp[$i + 1]).match(/^<(?:p|table|tr|td)\s/)) {
                                                                        data += '<br />';
                                                                }