Make filter application regex use raw strings

This commit is contained in:
Lorenz Diener 2018-11-26 11:44:13 +01:00
pare d1717be251
commit 9c5c5b85cc

Veure arxiu

@ -890,8 +890,8 @@ class Mastodon:
if "status" in filter_object: if "status" in filter_object:
filter_status = filter_object["status"] filter_status = filter_object["status"]
filter_text = filter_status["content"] filter_text = filter_status["content"]
filter_text = re.sub("<.*?>", " ", filter_text) filter_text = re.sub(r"<.*?>", " ", filter_text)
filter_text = re.sub('\s+', ' ', filter_text).strip() filter_text = re.sub(r"\s+", " ", filter_text).strip()
if not filter_re.search(filter_text): if not filter_re.search(filter_text):
filter_results.append(filter_object) filter_results.append(filter_object)
return filter_results return filter_results