diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-02-03 21:14:22 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-02-03 21:14:41 +0100 |
commit | 3c451cf88f5bbdfe8459f61bb8167872e32e2297 (patch) | |
tree | 2759d38c3c326eea02d037005e9ed08d4314851a /app/javascript/flavours | |
parent | 8ce02aa6e82d40d7a9e7c842ae2b67dcf31e8a79 (diff) |
[Glitch] Fix useless regular-expression character escape detected by CodeQL
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r-- | app/javascript/flavours/glitch/utils/hashtag.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/utils/hashtag.js b/app/javascript/flavours/glitch/utils/hashtag.js index 2024a665c..8f5665c46 100644 --- a/app/javascript/flavours/glitch/utils/hashtag.js +++ b/app/javascript/flavours/glitch/utils/hashtag.js @@ -1,6 +1,6 @@ export function recoverHashtags (recognizedTags, text) { return recognizedTags.map(tag => { - const re = new RegExp(`(?:^|[^\/\)\w])#(${tag.name})`, 'i'); + const re = new RegExp(`(?:^|[^\/)\w])#(${tag.name})`, 'i'); const matched_hashtag = text.match(re); return matched_hashtag ? matched_hashtag[1] : null; }, |