Fix processing mentions to domains with non-ascii TLDs (#16689)
Fixes #16602
This commit is contained in:
parent
d33b361000
commit
e10920eb20
2 changed files with 19 additions and 1 deletions
|
@ -56,7 +56,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