diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-01 01:11:15 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-06-01 01:11:17 +0300 |
commit | 371ae05c15f0a523585c67cdaa15605b617ef037 (patch) | |
tree | d2db072882128c6bf3e5cfd501c5de2dd84412f7 /app/models | |
parent | 322c9be816cd5cd9747a8737ec04622aa6b81e6b (diff) |
Don't match email addresses or foo@bar as user references
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 9aad327b592..9e13e91536d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -369,6 +369,7 @@ class User < ActiveRecord::Base # Pattern used to extract `@user` user references from text def reference_pattern %r{ + (?<!\w) #{Regexp.escape(reference_prefix)} (?<user>#{Gitlab::PathRegex::FULL_NAMESPACE_FORMAT_REGEX}) }x |