diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-09-01 22:06:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 22:06:40 +0200 |
commit | 2b18f7a9436c29ff948b1c1fe9b777435d1b03c1 (patch) | |
tree | f3dec6cc6f253e6e70dccb989360624ceeb72a83 /app | |
parent | f81ff4e5ed68c1e5fb5a4bf9374cd86acc1a94c0 (diff) |
Fix processing mentions to domains with non-ascii TLDs (#16689)
Fixes #16602
Diffstat (limited to 'app')
-rw-r--r-- | app/models/account.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 2c2840ee4..2f2a55b55 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -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 |