Prevent nesting <table> inside <p></p>
authorAlexander Ebert <ebert@woltlab.com>
Thu, 19 Feb 2015 14:05:19 +0000 (15:05 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 19 Feb 2015 14:05:19 +0000 (15:05 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index b3e84c7d56d4a3b7424518b6a52b1944d2c3139c..f180ef6348b5edd9a88b9175b960893089c1a6b1 100644 (file)
@@ -1059,7 +1059,7 @@ RedactorPlugins.wbbcode = function() {
                                var $line = $.trim($tmp[$i]);
                                
                                if ($line.match(/^<([a-z]+)/) || $line.match(/<\/([a-z]+)>$/)) {
-                                       if (this.reIsBlock.test(RegExp.$1.toUpperCase())) {
+                                       if (this.reIsBlock.test(RegExp.$1.toUpperCase()) || RegExp.$1.toUpperCase() === 'TABLE') {
                                                // check if line starts and ends with the same tag
                                                if ($line.match(/^<([a-z]+).*<\/\1>/)) {
                                                        data += $line;