From 9c5c5b85cc1bf957f1b27f8105942b98e1d650c5 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Mon, 26 Nov 2018 11:44:13 +0100 Subject: Make filter application regex use raw strings --- mastodon/Mastodon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index a0cf907..1735583 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -890,8 +890,8 @@ class Mastodon: if "status" in filter_object: filter_status = filter_object["status"] filter_text = filter_status["content"] - filter_text = re.sub("<.*?>", " ", filter_text) - filter_text = re.sub('\s+', ' ', filter_text).strip() + filter_text = re.sub(r"<.*?>", " ", filter_text) + filter_text = re.sub(r"\s+", " ", filter_text).strip() if not filter_re.search(filter_text): filter_results.append(filter_object) return filter_results -- cgit v1.2.3