From: Alexander Ebert Date: Fri, 19 Sep 2014 10:21:17 +0000 (+0200) Subject: Fixed formatting causing newlines to be discarded X-Git-Tag: 2.1.0_Alpha_1~320 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d0dddfe726df93f073e43c6dd734aea3712dda5;p=GitHub%2FWoltLab%2FWCF.git Fixed formatting causing newlines to be discarded Fixes #1796 --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 49fc415d24..086e1d6f14 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -650,10 +650,10 @@ RedactorPlugins.wbbcode = { for (var $i = 0, $length = $tmp.length; $i < $length; $i++) { var $line = $.trim($tmp[$i]); - if ($line.indexOf('<') === 0) { + if ($line.match(/^<([a-z]+)/)) { data += $line; - if (!$line.match(/>$/) || $line.match(/]+>.*?<\/span>$/)) { + if (!this.opts.rBlockTest.test(RegExp.$1.toUpperCase())) { data += '
'; } }