mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Changed hashtag regex to only accept hashtags that begin with a letter
This commit is contained in:
@@ -247,7 +247,7 @@ function autolinkHashtags(text, tokens) {
|
||||
return prefix + alias;
|
||||
}
|
||||
|
||||
return output.replace(/(^|\W)(#[a-zA-Z0-9.\-_]+)\b/g, replaceHashtagWithToken);
|
||||
return output.replace(/(^|\W)(#[a-zA-Z][a-zA-Z0-9.\-_]*)\b/g, replaceHashtagWithToken);
|
||||
}
|
||||
|
||||
function highlightSearchTerm(text, tokens, searchTerm) {
|
||||
|
||||
Reference in New Issue
Block a user