Merge pull request #1064 from capric98/pretty-url

fix: %2F in path will be converted to " › " in searx/webapp.py
This commit is contained in:
Paul Braeuning 2022-04-08 10:08:51 +02:00 committed by GitHub
commit 604d177551
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -434,7 +434,7 @@ def _get_enable_categories(all_categories: Iterable[str]):
def get_pretty_url(parsed_url: urllib.parse.ParseResult): def get_pretty_url(parsed_url: urllib.parse.ParseResult):
path = parsed_url.path path = parsed_url.path
path = path[:-1] if len(path) > 0 and path[-1] == '/' else path path = path[:-1] if len(path) > 0 and path[-1] == '/' else path
path = unquote(path).replace("/", " ") path = unquote(path.replace("/", " "))
return [parsed_url.scheme + "://" + parsed_url.netloc, path] return [parsed_url.scheme + "://" + parsed_url.netloc, path]