diff --git a/app/services/word_watcher.rb b/app/services/word_watcher.rb index ff82f36bd55..20614d23a7f 100644 --- a/app/services/word_watcher.rb +++ b/app/services/word_watcher.rb @@ -19,7 +19,7 @@ class WordWatcher nil else regexp = '(' + words.map { |w| word_to_regexp(w) }.join('|'.freeze) + ')' - SiteSetting.watched_words_regular_expressions? ? regexp : "\\b(#{regexp})\\b" + SiteSetting.watched_words_regular_expressions? ? regexp : "(?