forked from zaclys/searxng
		
	Unquote path on result page.
This commit is contained in:
		
							parent
							
								
									765504ceca
								
							
						
					
					
						commit
						57a3252ff1
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue