Renamed variable, YUI Compressor treats "float" as reserved word
authorAlexander Ebert <ebert@woltlab.com>
Thu, 18 Dec 2014 01:38:10 +0000 (02:38 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 18 Dec 2014 01:38:10 +0000 (02:38 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index c9e5c31c935ef2bad163a04136e4120ccd252097..e5e4ddc9e2df0876b8366e744dea261d544b877b 100644 (file)
@@ -688,9 +688,9 @@ RedactorPlugins.wbbcode = function() {
                                
                        // [img]
                        data = data.replace(/\[img\]([^"]+?)\[\/img\]/gi,'<img src="$1" />');
-                       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 '<img src="' + src + '" style="' + $style + '" />';
                        });
-                       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 {