From 36187a5bacab89d9beef38538c7635fc4c54448f Mon Sep 17 00:00:00 2001 From: kek7198 Date: Sun, 12 Dec 2021 00:26:24 -0600 Subject: [PATCH] fix classes --- files/helpers/sanitize.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index bf286cec4..a9f5ab24e 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -170,16 +170,16 @@ def sanitize(sanitized, noimages=False): for i in re.finditer('(?', sanitized, flags=re.I) + sanitized = re.sub(f'(?', sanitized, flags=re.I) elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'): - sanitized = re.sub(f'(?', sanitized, flags=re.I) + sanitized = re.sub(f'(?', sanitized, flags=re.I) sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.twitter", "https://twitter").replace("https://m.facebook", "https://facebook").replace("https://m.wikipedia", "https://wikipedia").replace("https://m.youtube", "https://youtube") @@ -240,10 +240,10 @@ def filter_emojis_only(title): if emoji.startswith("!"): emoji = emoji[1:] if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'): - title = re.sub(f'(?', title, flags=re.I) + title = re.sub(f'(?', title, flags=re.I) elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'): - title = re.sub(f'(?', title, flags=re.I) + title = re.sub(f'(?', title, flags=re.I) if len(title) > 1500: abort(400) else: return title \ No newline at end of file