From 5e4d6a72a436044ae7804d0bfa35a07b659fe99c Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 25 May 2022 11:31:06 -0600 Subject: [PATCH] Remove duplicated handling of /url result links 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 --- app/filter.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/filter.py b/app/filter.py index 6b281e1..5acf31b 100644 --- a/app/filter.py +++ b/app/filter.py @@ -433,10 +433,6 @@ class Filter: # Internal google links (i.e. mail, maps, etc) should still # be forwarded to Google link['href'] = 'https://google.com' + q - elif link['href'].startswith('/url'): - link['href'] = q - if self.config.new_tab: - link['target'] = '_blank' elif q.startswith('https://accounts.google.com'): # Remove Sign-in link link.decompose()