diff options
author | Lorenz Diener <[email protected]> | 2018-11-26 11:44:13 +0100 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2018-11-26 11:44:13 +0100 |
commit | 9c5c5b85cc1bf957f1b27f8105942b98e1d650c5 (patch) | |
tree | 2fa759872d1a437ecfc458e4fdb03459c456054b /mastodon | |
parent | d1717be251295ed766fda03bd9c8535459bfc404 (diff) | |
download | mastodon.py-9c5c5b85cc1bf957f1b27f8105942b98e1d650c5.tar.gz |
Make filter application regex use raw strings
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: | |||
890 | if "status" in filter_object: | 890 | if "status" in filter_object: |
891 | filter_status = filter_object["status"] | 891 | filter_status = filter_object["status"] |
892 | filter_text = filter_status["content"] | 892 | filter_text = filter_status["content"] |
893 | filter_text = re.sub("<.*?>", " ", filter_text) | 893 | filter_text = re.sub(r"<.*?>", " ", filter_text) |
894 | filter_text = re.sub('\s+', ' ', filter_text).strip() | 894 | filter_text = re.sub(r"\s+", " ", filter_text).strip() |
895 | if not filter_re.search(filter_text): | 895 | if not filter_re.search(filter_text): |
896 | filter_results.append(filter_object) | 896 | filter_results.append(filter_object) |
897 | return filter_results | 897 | return filter_results |