diff --git a/src/components/card/CommentForm.vue b/src/components/card/CommentForm.vue index 7a1b909f8..64af6929d 100644 --- a/src/components/card/CommentForm.vue +++ b/src/components/card/CommentForm.vue @@ -131,7 +131,9 @@ export default { // FIXME Adding a space after the mention should be improved to // do it or not based on the next element instead of always // adding it. - mention.replaceWith(' @' + mention.firstElementChild.attributes['data-mention-id'].value + ' ') + // FIXME user names can contain spaces, in that case they need to be wrapped @"user name" [a-zA-Z0-9\ _\.@\-']+ + const mentionValue = mention.firstElementChild.attributes['data-mention-id'].value + mention.replaceWith(' @' + mentionValue + ' ') }) return rawToParsed(node.innerHTML)