diff options
author | David Yip <yipdw@member.fsf.org> | 2018-06-12 16:39:30 -0500 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-06-12 16:39:30 -0500 |
commit | e931cf656d1de6d89b5b048d8f1de15be7b52690 (patch) | |
tree | b1c0c66b6a88b56c422ea8be1dbef77e42afae72 /app/models/glitch/keyword_mute.rb | |
parent | 97d2df77aae687c983c1294ebcd3962e4f9d985c (diff) | |
parent | 34f1fd2a621ca869c17009487e2f10063812fbd0 (diff) |
Merge remote-tracking branch 'glitchsoc/master' into 454-allow-keyword-mutes-to-skip-mentions
Conflicts: app/models/glitch/keyword_mute.rb
Diffstat (limited to 'app/models/glitch/keyword_mute.rb')
-rw-r--r-- | app/models/glitch/keyword_mute.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/glitch/keyword_mute.rb b/app/models/glitch/keyword_mute.rb index 11b7958f6..49769cb73 100644 --- a/app/models/glitch/keyword_mute.rb +++ b/app/models/glitch/keyword_mute.rb @@ -67,7 +67,7 @@ class Glitch::KeywordMute < ApplicationRecord def matches?(str, required_scope) ((required_scope & scope) == required_scope) && \ - str =~ (whole_word ? boundary_regex_for_keyword : /#{keyword}/i) + str =~ (whole_word ? boundary_regex_for_keyword : /#{Regexp.escape(keyword)}/i) end end |