From 78614877f278e3c58bccbaa1fccc06524eee5d96 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 1 Aug 2022 12:12:55 -0600 Subject: [PATCH] Fix redirect for misspelled queries starting with `/` Fixes #818 --- app/filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/filter.py b/app/filter.py index 3dcfc03..2d96401 100644 --- a/app/filter.py +++ b/app/filter.py @@ -462,7 +462,7 @@ class Filter: result_link = urlparse.urlparse(href) q = extract_q(result_link.query, href) - if q.startswith('/') and q not in self.query: + if q.startswith('/') and q not in self.query and 'spell=1' not in href: # Internal google links (i.e. mail, maps, etc) should still # be forwarded to Google link['href'] = 'https://google.com' + q