From 39123997f0cb5662ae07ac1230d06ad5ab3db84f Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 16 Nov 2023 15:14:39 +0200 Subject: [PATCH] unquote url after normalizing too (some forums have the path inside a query parameter and quoting breaks their links) https://rdrama.net/search/posts/?q=%3Fforums --- files/helpers/sanitize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 6d1a0fa04..10797c5be 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -797,6 +797,8 @@ def normalize_url(url): url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=grand', url) + url = unquote(url).rstrip('=') + return url def normalize_url_gevent(url):