From: Alexander Ebert Date: Sun, 22 Feb 2015 08:18:35 +0000 (+0100) Subject: Trimming content inside ... is dangerous X-Git-Tag: 2.1.0_RC_2~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c840a5998d0e5deebbb17c2632353cf4dc31d34;p=GitHub%2FWoltLab%2FWCF.git Trimming content inside ... is dangerous --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 1335db8c4a..b4d18c8ca9 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -457,7 +457,7 @@ RedactorPlugins.wbbcode = function() { if ($value == '') { var $opening = $openElements.pop(); - var $tmp = $opening.start + $.trim($buffer.pop()) + $opening.end; + var $tmp = $opening.start + $buffer.pop() + $opening.end; if ($buffer.length) { $buffer[$buffer.length - 1] += $tmp; @@ -837,7 +837,6 @@ RedactorPlugins.wbbcode = function() { // [size] data = data.replace(/\[size=(\d+)\]([\s\S]*?)\[\/size\]/gi, (function(match, size, content) { - content = $.trim(content); if (!content.length) { content = this.opts.invisibleSpace; } @@ -847,7 +846,6 @@ RedactorPlugins.wbbcode = function() { // [color] data = data.replace(/\[color=([#a-z0-9]*?)\]([\s\S]*?)\[\/color\]/gi, (function(match, color, content) { - content = $.trim(content); if (!content.length) { content = this.opts.invisibleSpace; } @@ -857,7 +855,6 @@ RedactorPlugins.wbbcode = function() { // [font] data = data.replace(/\[font='?([a-z,\- ]*?)'?\]([\s\S]*?)\[\/font\]/gi, (function(match, fontFamily, content) { - content = $.trim(content); if (!content.length) { content = this.opts.invisibleSpace; }