Fix processing mentions to domains with non-ascii TLDs (#16689)
Fixes #16602
This commit is contained in:
parent
2688f18d06
commit
5899fe70b6
2 changed files with 20 additions and 2 deletions
|
@ -58,8 +58,8 @@ class Account < ApplicationRecord
|
|||
hub_url
|
||||
)
|
||||
|
||||
USERNAME_RE = /[a-z0-9_]+([a-z0-9_\.-]+[a-z0-9_]+)?/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[[:word:]\.\-]+[a-z0-9]+)?)/i
|
||||
USERNAME_RE = /[a-z0-9_]+([a-z0-9_\.-]+[a-z0-9_]+)?/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[[:word:]\.\-]+[[:word:]]+)?)/i
|
||||
|
||||
include AccountAssociations
|
||||
include AccountAvatar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue