Fixed regex for quotes being too greedy
authorAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jun 2015 15:03:13 +0000 (17:03 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jun 2015 15:03:13 +0000 (17:03 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 2741e23ed0533e6070005544f8c71e8beefb2db6..ee446b238a00e54477e70dd6c718790818675c7e 100644 (file)
@@ -915,7 +915,7 @@ RedactorPlugins.wbbcode = function() {
                        data = data.replace(/\[sup\]([\s\S]*?)\[\/sup]/gi, (function(match, content) {
                                return this.wbbcode._expandFormatting(content, '<sup>', '</sup>');
                        }).bind(this));
-                               
+                       
                        // [img]
                        data = data.replace(/\[img\]([^"]+?)\[\/img\]/gi,'<img src="$1" />');
                        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 = '';