mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Changed mention parser to ignore empty string mentions
This commit is contained in:
@@ -213,6 +213,11 @@ function highlightCurrentMentions(text, tokens) {
|
||||
}
|
||||
|
||||
for (const mention of UserStore.getCurrentMentionKeys()) {
|
||||
// occasionally we get an empty mention which matches a bunch of empty strings
|
||||
if (!mention) {
|
||||
continue;
|
||||
}
|
||||
|
||||
output = output.replace(new RegExp(`(^|\\W)(${escapeRegex(mention)})\\b`, 'gi'), replaceCurrentMentionWithToken);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user