From c7d1200b6b654cf4f089dacd47fa9ec0138ec8b3 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 5 Aug 2023 23:39:35 +0300 Subject: [PATCH] improve is_whitelisted --- files/helpers/sanitize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 7a82a7cf2..c7b7a862f 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -663,13 +663,13 @@ def filter_emojis_only(title, golden=True, count_emojis=False, graceful=False): return title.strip() def is_whitelisted(domain, k): - if k.lower().endswith('id'): - return True if 'sort' in k.lower() or 'query' in k.lower(): return True - if k in {'v','context','q','page','time_continue','title','scrollToComments','u','url'}: + if k in {'v','context','q','page','time_continue','title','scrollToComments','u','url','story_fbid','fbid','forum_id','vid','oldid','postid','post_id','threadid','thread_id','ticket_form_id'}: return True - if k == 't' and domain != 'youtube.com': + if k == 't' and domain != 'twitter.com': + return True + if k == 'oid' and domain != 'quora.com': return True return False