FIX: mentions regex server-side (ie. don't count email addresses)

This commit is contained in:
Régis Hanol
2016-01-12 09:53:09 +01:00
parent 65e808b26d
commit 96aa5b865f
3 changed files with 11 additions and 3 deletions

View File

@@ -74,7 +74,7 @@ module PrettyText
@ctx_init = Mutex.new
def self.mention_matcher
Regexp.new("(\@[a-zA-Z0-9_]{#{User.username_length.begin},#{User.username_length.end}})")
Regexp.new("\\W@(\\w{#{SiteSetting.min_username_length},#{SiteSetting.max_username_length}})\\b")
end
def self.app_root