From ba296f056a2fc264eb3e6f52a813d553750bb105 Mon Sep 17 00:00:00 2001 From: jacr13 Date: Fri, 9 Apr 2021 19:31:49 +0200 Subject: [PATCH] prevent whoogle links from opening in a new tab. --- app/filter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/filter.py b/app/filter.py index a9d8aee..dc7cb4c 100644 --- a/app/filter.py +++ b/app/filter.py @@ -206,7 +206,9 @@ class Filter: # Temporarily removing all links to that tab for now. link.decompose() return - elif self.new_tab: + elif (self.new_tab + and not href.startswith('/search') + and not href.startswith('/?safe')): link['target'] = '_blank' result_link = urlparse.urlparse(href)