From 1d4657b71427ec19a031883aab628f6ac50fdd9c Mon Sep 17 00:00:00 2001 From: xywei Date: Thu, 23 Jul 2020 11:12:19 -0500 Subject: [PATCH] Fix relative urls that do not start with '/' --- searx/engines/xpath.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py index b75896cc7..a9f3e4bdd 100644 --- a/searx/engines/xpath.py +++ b/searx/engines/xpath.py @@ -61,6 +61,10 @@ def extract_url(xpath_results, search_url): # fix relative url to the search engine url = urljoin(search_url, url) + # fix relative urls that fall through the crack + if '://' not in url: + url = urljoin(search_url, url) + # normalize url url = normalize_url(url)