From 41e46f69b69d984558a95cdd2b9a17d562331c62 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 28 Dec 2014 16:44:06 +0100 Subject: [PATCH] Fixed quote-BBCode recognition being case-sensitive --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 1a8c21b9d6..7a0e0139f6 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -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(); -- 2.20.1