Fix redirect for misspelled queries starting with `/`

Fixes #818
pull/835/head
Ben Busby 2 years ago
parent bf92944b95
commit 78614877f2
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1

@ -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

Loading…
Cancel
Save