diff --git a/assets/js/components/textParser.js b/assets/js/components/textParser.js index d720794a..aafd7796 100644 --- a/assets/js/components/textParser.js +++ b/assets/js/components/textParser.js @@ -37,11 +37,11 @@ ComunicWeb.components.textParser = { _prepare_user_tag_parsing: function(target){ //Find all occurences of users tag - while(target.innerHTML.match(/@[a-zA-Z0-9.]+/i)){ + while(target.innerHTML.match(/ @[a-zA-Z0-9.]+/i)){ //Get user tag - var userTag = target.innerHTML.match(/@[a-zA-Z0-9.]+/i)[0]; - var userID = userTag.replace("@", ""); + var userTag = target.innerHTML.match(/ @[a-zA-Z0-9.]+/i)[0]; + var userID = userTag.replace(" @", ""); target.innerHTML = target.innerHTML.replace(userTag, ""+userID+"");