Fix processing mentions to domains with non-ascii TLDs (#16689)
Fixes #16602
This commit is contained in:
parent
f81ff4e5ed
commit
2b18f7a943
2 changed files with 19 additions and 1 deletions
|
@ -59,7 +59,7 @@ class Account < ApplicationRecord
|
|||
)
|
||||
|
||||
USERNAME_RE = /[a-z0-9_]+([a-z0-9_\.-]+[a-z0-9_]+)?/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[[:word:]\.\-]+[a-z0-9]+)?)/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[[:word:]\.\-]+[[:word:]]+)?)/i
|
||||
URL_PREFIX_RE = /\Ahttp(s?):\/\/[^\/]+/
|
||||
|
||||
include AccountAssociations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue