Ensure that a smiley is always followed by a whitespace
authorAlexander Ebert <ebert@woltlab.com>
Tue, 26 Aug 2014 18:18:55 +0000 (20:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 26 Aug 2014 18:18:55 +0000 (20:18 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index a299afe43369a2a374c1bdc44e0bbb5580cb084b..984eb850b4c9c605733c07acc9e3fe39f75b4c32 100644 (file)
@@ -279,8 +279,8 @@ RedactorPlugins.wbbcode = {
                html = html.replace(/<\/sup>/gi, '[/sup]');
                
                // 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" data-attachment-id="(\d+)".*?>/gi, '[attach=$1][/attach]');