From d025da5da9b6b6bf3c0003191f07a8184e545f8a Mon Sep 17 00:00:00 2001 From: hmhealey Date: Tue, 22 Sep 2015 14:28:43 -0400 Subject: [PATCH] Changed hashtag regex to only accept hashtags that begin with a letter --- web/react/utils/text_formatting.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index 940bd04855..089fdd4f92 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -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) {