From: Alexander Ebert Date: Wed, 25 Feb 2015 09:51:52 +0000 (+0100) Subject: Fixed smiley replacement being too greedy X-Git-Tag: 2.1.0~32 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e1a93c93344b46fad449666f15351a9038b4e7ca;p=GitHub%2FWoltLab%2FWCF.git Fixed smiley replacement being too greedy --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index d4eb8e8cc7..959a85eab8 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -554,8 +554,8 @@ RedactorPlugins.wbbcode = function() { }); // smileys - html = html.replace(/ ?]*?alt="([^"]+?)".*?class="smiley".*?> ?/gi, ' $1 '); // firefox - html = html.replace(/ ?]*?class="smiley".*?alt="([^"]+?)".*?> ?/gi, ' $1 '); // chrome, ie + html = html.replace(/ ?]*?alt="([^"]+?)"[^>]*?class="smiley"[^>]*?> ?/gi, ' $1 '); // firefox + html = html.replace(/ ?]*?class="smiley"[^>]*?alt="([^"]+?)"[^>]*?> ?/gi, ' $1 '); // chrome, ie // attachments html = html.replace(//gi, function(match, attributesBefore, attributesAfter) {