From ad4394a8e2e22b9c84fb3ca6e7e3b5bb69624f63 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 26 Apr 2015 17:13:42 +0200 Subject: [PATCH] Fixed an issue with unclosed formatting in tables --- .../files/js/3rdParty/redactor/plugins/wbbcode.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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 = ''; -- 2.20.1