Slightly improved smiley detection
authorAlexander Ebert <ebert@woltlab.com>
Tue, 24 Feb 2015 10:25:52 +0000 (11:25 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 24 Feb 2015 10:25:52 +0000 (11:25 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 43f0f8b9e2ee8fb82f51e11cccc856f0a744d0fc..37c3ce522e220603b93d87146ca320bb14a7f724 100644 (file)
@@ -554,8 +554,8 @@ RedactorPlugins.wbbcode = function() {
                        });
                        
                        // smileys
-                       html = html.replace(/ ?<img [^>]*?alt="([^"]+?)" class="smiley".*?> ?/gi, ' $1 '); // firefox
-                       html = html.replace(/ ?<img [^>]*?class="smiley" alt="([^"]+?)".*?> ?/gi, ' $1 '); // chrome, ie
+                       html = html.replace(/ ?<img [^>]*?alt="([^"]+?)".*?class="smiley".*?> ?/gi, ' $1 '); // firefox
+                       html = html.replace(/ ?<img [^>]*?class="smiley".*?alt="([^"]+?)".*?> ?/gi, ' $1 '); // chrome, ie
                        
                        // attachments
                        html = html.replace(/<img(.*?)class="[^"]*redactorEmbeddedAttachment[^"]*"(.*?)>/gi, function(match, attributesBefore, attributesAfter) {