From: Matthias Schmidt Date: Sat, 21 Sep 2013 07:52:43 +0000 (+0200) Subject: Fixes issue with user mention suggestions X-Git-Tag: 2.0.0_Beta_10~47^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8bd90727f0ed2706abd854b07afab02a6cd3e749;p=GitHub%2FWoltLab%2FWCF.git Fixes issue with user mention suggestions --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 95c4d3b80f..f27a3221d2 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -3130,13 +3130,16 @@ WCF.Message.UserMention = Class.extend({ $text = ''; for (var $i = 0; $i < $textBackup.length; $i++) { var $byte = $textBackup.charCodeAt($i).toString(16); - if ($byte != '200b' && $byte != 'a0') { + if ($byte != '200b' && !$textBackup.charAt($i).match(/\s/)) { if ($textBackup[$i] === '@' && $i && $textBackup[$i - 1].match(/\s/)) { $text = ''; } $text += $textBackup[$i]; } + else { + $text = ''; + } } return $text;