Fixed detection of embedded attachments
authorAlexander Ebert <ebert@woltlab.com>
Fri, 13 Feb 2015 20:20:47 +0000 (21:20 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 13 Feb 2015 20:20:47 +0000 (21:20 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 8aaf664184f3df2db49692f5f5403bef531a6630..95d12408bfe6fae6764c3c2a216dad6c1307e111 100644 (file)
@@ -515,7 +515,7 @@ RedactorPlugins.wbbcode = function() {
                        html = html.replace(/ ?<img [^>]*?class="smiley" alt="([^"]+?)".*?> ?/gi, ' $1 '); // chrome, ie
                        
                        // attachments
-                       html = html.replace(/<img(.*?)class="redactorEmbeddedAttachment"(.*?)>/gi, function(match, attributesBefore, attributesAfter) {
+                       html = html.replace(/<img(.*?)class="[^"]*redactorEmbeddedAttachment[^"]*"(.*?)>/gi, function(match, attributesBefore, attributesAfter) {
                                var $attributes = attributesBefore + ' ' + attributesAfter;
                                var $attachmentID;
                                if ($attributes.match(/data-attachment-id="(\d+)"/)) {