From: Alexander Ebert Date: Thu, 18 Dec 2014 01:38:10 +0000 (+0100) Subject: Renamed variable, YUI Compressor treats "float" as reserved word X-Git-Tag: 2.1.0_Beta_2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0696283908fa9415dc5e84a672a586feef900a6f;p=GitHub%2FWoltLab%2FWCF.git Renamed variable, YUI Compressor treats "float" as reserved word --- 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 {