From: Go Shoemake Date: Thu, 11 May 2017 01:47:38 +0000 (-0700) Subject: Fixed mention regex to support unicode (#2420) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=9cd3a6836b952bda507734b6a476dfaa9b4640fb;p=mastodon.git Fixed mention regex to support unicode (#2420) --- diff --git a/app/models/account.rb b/app/models/account.rb index c2dc77d93..d43cae038 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -39,7 +39,7 @@ # class Account < ApplicationRecord - MENTION_RE = /(?:^|[^\/\w])@([a-z0-9_]+(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i + MENTION_RE = /(?:^|[^\/[:word:]])@([a-z0-9_]+(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i include AccountAvatar include AccountHeader