From f705c76cc568dfd6d3e1bdd079fcc4b5e68cf4d3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 20 Jun 2015 17:03:13 +0200 Subject: [PATCH] Fixed regex for quotes being too greedy --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 2741e23ed0..ee446b238a 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -915,7 +915,7 @@ RedactorPlugins.wbbcode = function() { data = data.replace(/\[sup\]([\s\S]*?)\[\/sup]/gi, (function(match, content) { return this.wbbcode._expandFormatting(content, '', ''); }).bind(this)); - + // [img] data = data.replace(/\[img\]([^"]+?)\[\/img\]/gi,''); data = data.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi, function(match, src, alignment) { @@ -1247,7 +1247,7 @@ RedactorPlugins.wbbcode = function() { var self = this; var $transformQuote = function(quote) { - return quote.replace(/\[quote(=['"].+['"])?\]([\S\s]*)\[\/quote\]/gi, function(match, attributes, innerContent) { + return quote.replace(/\[quote(=['"].+?\1)?\]([\S\s]*)\[\/quote\]/gi, function(match, attributes, innerContent) { var $author = ''; var $link = ''; -- 2.20.1