Fix ß bug in regexp for mentions and tags (#31122)
This commit is contained in:
parent
e881a59671
commit
337a7fcf30
4 changed files with 18 additions and 2 deletions
|
@ -68,7 +68,7 @@ class Account < ApplicationRecord
|
|||
INSTANCE_ACTOR_ID = -99
|
||||
|
||||
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:]]+)?)}
|
||||
URL_PREFIX_RE = %r{\Ahttp(s?)://[^/]+}
|
||||
USERNAME_ONLY_RE = /\A#{USERNAME_RE}\z/i
|
||||
USERNAME_LENGTH_LIMIT = 30
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue