From 0696283908fa9415dc5e84a672a586feef900a6f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 18 Dec 2014 02:38:10 +0100 Subject: [PATCH] Renamed variable, YUI Compressor treats "float" as reserved word --- .../files/js/3rdParty/redactor/plugins/wbbcode.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index c9e5c31c93..e5e4ddc9e2 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -688,9 +688,9 @@ RedactorPlugins.wbbcode = function() { // [img] data = data.replace(/\[img\]([^"]+?)\[\/img\]/gi,''); - data = data.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi, function(match, src, float) { - var $style = 'float: ' + float + ';'; - if (float === 'left') { + data = data.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi, function(match, src, alignment) { + var $style = 'float: ' + alignment + ';'; + if (alignment === 'left') { $style += 'margin: 0 15px 7px 0'; } else { @@ -699,9 +699,9 @@ RedactorPlugins.wbbcode = function() { return ''; }); - data = data.replace(/\[img='?([^"]*?)'?,'?(left|right|none)'?,'?(\d+)'?\]\[\/img\]/gi, function(match, src, float, width) { - var $style = 'float: ' + float + '; width: ' + width + 'px'; - if (float === 'left') { + data = data.replace(/\[img='?([^"]*?)'?,'?(left|right|none)'?,'?(\d+)'?\]\[\/img\]/gi, function(match, src, alignment, width) { + var $style = 'float: ' + alignment + '; width: ' + width + 'px'; + if (alignment === 'left') { $style += 'margin: 0 15px 7px 0'; } else { -- 2.20.1