Dont match mention in url query string (#25656)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Matt JankowskiandClaire authored and GitHub committed 2023-10-03 17:01:45 +02:00
1 parent 2f8f92df48
commit c676bc91e9
3 files changed
+2 -6

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ class Account < ApplicationRecord
BACKGROUND_REFRESH_INTERVAL = 1.week.freeze
USERNAME_RE = /[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i
MENTION_RE = %r{(?<=^|[^/[:word:]])@((#{USERNAME_RE})(?:@[[:word:].-]+[[:word:]]+)?)}i
MENTION_RE = %r{(?<![=/[:word:]])@((#{USERNAME_RE})(?:@[[:word:].-]+[[:word:]]+)?)}i
URL_PREFIX_RE = %r{\Ahttp(s?)://[^/]+}
USERNAME_ONLY_RE = /\A#{USERNAME_RE}\z/i