]> cat aescling's git repositories - mastodon.git/commitdiff
Fixed mention regex to support unicode (#2420)
authorGo Shoemake <marrus-sh@users.noreply.github.com>
Thu, 11 May 2017 01:47:38 +0000 (18:47 -0700)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 11 May 2017 01:47:38 +0000 (03:47 +0200)
app/models/account.rb

index c2dc77d932b0775abb1d92cab64bdcd527edc46c..d43cae038ffaec6e22bc88417210444d0be0997b 100644 (file)
@@ -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