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: