Fix redirect for misspelled queries starting with `/`

Fixes #818
このコミットが含まれているのは:
Ben Busby 2022-08-01 12:12:55 -06:00
コミット 78614877f2
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: B9B7231E01D924A1
1個のファイルの変更1行の追加1行の削除

ファイルの表示

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