From 6d0dddfe726df93f073e43c6dd734aea3712dda5 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 19 Sep 2014 12:21:17 +0200 Subject: [PATCH] Fixed formatting causing newlines to be discarded Fixes #1796 --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 += '
'; } } -- 2.20.1