From: Alexander Ebert Date: Sun, 26 Apr 2015 15:13:42 +0000 (+0200) Subject: Fixed an issue with unclosed formatting in tables X-Git-Tag: 2.1.4~47^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad4394a8e2e22b9c84fb3ca6e7e3b5bb69624f63;p=GitHub%2FWoltLab%2FWCF.git Fixed an issue with unclosed formatting in tables --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index f87fd2eea2..5c2aa24c50 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -1433,6 +1433,15 @@ RedactorPlugins.wbbcode = function() { return openingTag + this.opts.invisibleSpace + closingTag; } + // check for unclosed tags in tables + var $index = content.indexOf('[/td]'); + if ($index !== -1) { + var $tmp = content.substring(0, $index); + if ($tmp.indexOf('[td]') === -1) { + return openingTag + $tmp + closingTag + content.substring($index); + } + } + var $tmp = content.split("\n"); content = '';