Fixed quote-BBCode recognition being case-sensitive
authorAlexander Ebert <ebert@woltlab.com>
Sun, 28 Dec 2014 15:44:06 +0000 (16:44 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 28 Dec 2014 15:44:06 +0000 (16:44 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 1a8c21b9d6f5f5d470924ae2d28331e6f9d2c97a..7a0e0139f62ff8ea96045bf40b3baf1e4123ebd2 100644 (file)
@@ -878,13 +878,13 @@ RedactorPlugins.wbbcode = function() {
                        var $cachedQuotes = [ ];
                        var $knownQuotes = [ ];
                        
-                       var $parts = data.split(/(\[(?:\/quote|quote|quote='[^']*?'(?:,'[^']*?')?|quote="[^"]*?"(?:,"[^"]*?")?)\])/);
+                       var $parts = data.split(/(\[(?:\/quote|quote|quote='[^']*?'(?:,'[^']*?')?|quote="[^"]*?"(?:,"[^"]*?")?)\])/i);
                        var $lostQuote = WCF.getUUID();
                        while (true) {
                                var $foundClosingTag = false;
                                for (var $i = 0; $i < $parts.length; $i++) {
                                        var $part = $parts[$i];
-                                       if ($part === '[/quote]') {
+                                       if ($part.toLowerCase() === '[/quote]') {
                                                $foundClosingTag = true;
                                                
                                                var $content = '';
@@ -893,7 +893,7 @@ RedactorPlugins.wbbcode = function() {
                                                while ($previous.length) {
                                                        var $prev = $previous.pop();
                                                        $content = $prev + $content;
-                                                       if ($prev.match(/^\[quote/)) {
+                                                       if ($prev.match(/^\[quote/i)) {
                                                                $part = $content + $part;
                                                                
                                                                var $key = WCF.getUUID();