From 4a0089686e1c3942b2ea5b2c0e0910aa612f6ba7 Mon Sep 17 00:00:00 2001 From: Ahmad Alkadri Date: Mon, 21 Aug 2023 22:53:10 +0200 Subject: [PATCH] Fix: `keep_blank_values = True` to handle blank `q` input (#1052) --- app/filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/filter.py b/app/filter.py index 5a89b5c5a0..bc2bbd62b6 100644 --- a/app/filter.py +++ b/app/filter.py @@ -44,7 +44,7 @@ def extract_q(q_str: str, href: str) -> str: Returns: str: The 'q' element of the link, or an empty string """ - return parse_qs(q_str)['q'][0] if ('&q=' in href or '?q=' in href) else '' + return parse_qs(q_str, keep_blank_values=True)['q'][0] if ('&q=' in href or '?q=' in href) else '' def build_map_url(href: str) -> str: