From 57a3252ff182f2091d7c708ad0bb95499421102e Mon Sep 17 00:00:00 2001 From: HZH <42015599+capric98@users.noreply.github.com> Date: Tue, 5 Apr 2022 02:37:18 +0800 Subject: [PATCH] Unquote path on result page. --- searx/webapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 47a3c5bd2..18a488934 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -20,7 +20,7 @@ from typing import List, Dict, Iterable, Optional import urllib import urllib.parse -from urllib.parse import urlencode +from urllib.parse import urlencode, unquote import httpx @@ -434,7 +434,7 @@ def _get_enable_categories(all_categories: Iterable[str]): def get_pretty_url(parsed_url: urllib.parse.ParseResult): path = parsed_url.path path = path[:-1] if len(path) > 0 and path[-1] == '/' else path - path = path.replace("/", " › ") + path = unquote(path).replace("/", " › ") return [parsed_url.scheme + "://" + parsed_url.netloc, path]