Match alert words inside markup.

We now will match an alert word even if it is used at the boundry of
bolding, backtick escaping, or caret quoting.

Closes trac #2186.

(imported from commit 984bc63eb621772c95a01ca5c5bfeb190767f71f)
This commit is contained in:
Luke Faraone
2014-02-13 15:12:19 -05:00
parent 4ebc4a4ef1
commit 89eef10d44

View File

@@ -770,8 +770,8 @@ class AlertWordsNotificationProcessor(markdown.preprocessors.Preprocessor):
realm_words = db_data['realm_alert_words']
content = '\n'.join(lines).lower()
allowed_before_punctuation = "|".join([r'\s', '^', r'[\(\".,\';\[]'])
allowed_after_punctuation = "|".join([r'\s', '$', r'[\)\"\?:.,\';\]!]'])
allowed_before_punctuation = "|".join([r'\s', '^', r'[\(\".,\';\[\*`>]'])
allowed_after_punctuation = "|".join([r'\s', '$', r'[\)\"\?:.,\';\]!\*`]'])
for user_id, words in realm_words.iteritems():
for word in words: