Remove duplicated handling of /url result links (#769)

It appears that result links beginning with '/url' were mistakenly
commited with an inefficient filtering process in its place. With the
way the code is structured, this less effective '/url' link filter took
precedence over the previous link filter, and also caused users with the
"open link in new tab" config enabled to no longer have access to that
feature.

Fixes #769
main
Joao A. Candido Ramos 2022-05-25 19:37:34 +02:00 committed by GitHub
parent 9bcd9931f7
commit fb6627a9cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -433,8 +433,6 @@ class Filter:
# Internal google links (i.e. mail, maps, etc) should still # Internal google links (i.e. mail, maps, etc) should still
# be forwarded to Google # be forwarded to Google
link['href'] = 'https://google.com' + q link['href'] = 'https://google.com' + q
elif link['href'].startswith('/url'):
link['href'] = q
elif q.startswith('https://accounts.google.com'): elif q.startswith('https://accounts.google.com'):
# Remove Sign-in link # Remove Sign-in link
link.decompose() link.decompose()