From 55aa2e815c095de4fb7b23812ea955b85b1f2a6a Mon Sep 17 00:00:00 2001 From: 138138138 <78271024+138138138@users.noreply.github.com> Date: Sun, 27 Mar 2022 18:45:47 +0800 Subject: [PATCH] Add "nofollow noopener noreferrer" to all links Old iOS 12 devices will pass the Referer HTTP header to the site user clicks. Websites will know those traffic come from Whoogle search. Adding "nofollow noopener noreferrer" solves the issue. --- app/utils/search.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/utils/search.py b/app/utils/search.py index d476b5b..e471a12 100644 --- a/app/utils/search.py +++ b/app/utils/search.py @@ -153,6 +153,7 @@ class Search: self.request_params.to_dict(flat=True).items() if self.config.is_safe_key(k)) for link in formatted_results.find_all('a', href=True): + link['rel'] = "nofollow noopener noreferrer" if 'search?' not in link['href'] or link['href'].index( 'search?') > 1: continue