mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Make replace watched words work with wildcard (#13084)
Watched words are always regular expressions, despite watched_words_ _regular_expressions being enabled or not. Internally, wildcard characters are replaced with a regular expression that matches any non whitespace character.
This commit is contained in:
@ -173,7 +173,7 @@ module PrettyText
|
||||
__optInput.emojiUnicodeReplacer = __emojiUnicodeReplacer;
|
||||
__optInput.lookupUploadUrls = __lookupUploadUrls;
|
||||
__optInput.censoredRegexp = #{WordWatcher.word_matcher_regexp(:censor)&.source.to_json};
|
||||
__optInput.watchedWordsReplacements = #{WordWatcher.get_cached_words(:replace).to_json};
|
||||
__optInput.watchedWordsReplacements = #{WordWatcher.word_matcher_regexps(:replace).to_json};
|
||||
JS
|
||||
|
||||
if opts[:topicId]
|
||||
|
Reference in New Issue
Block a user