From 2b18f7a9436c29ff948b1c1fe9b777435d1b03c1 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 1 Sep 2021 22:06:40 +0200 Subject: Fix processing mentions to domains with non-ascii TLDs (#16689) Fixes #16602 --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') 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 -- cgit