|  | @@ -2,6 +2,7 @@ from collections import Iterable
 | 
	
		
			
			| 2 | 2 |  from json import loads
 | 
	
		
			
			| 3 | 3 |  from sys import version_info
 | 
	
		
			
			| 4 | 4 |  from searx.url_utils import urlencode
 | 
	
		
			
			|  | 5 | +from searx.utils import to_string
 | 
	
		
			
			| 5 | 6 |  
 | 
	
		
			
			| 6 | 7 |  if version_info[0] == 3:
 | 
	
		
			
			| 7 | 8 |      unicode = str
 | 
	
	
		
			
			|  | @@ -111,14 +112,22 @@ def response(resp):
 | 
	
		
			
			| 111 | 112 |                  content = query(result, content_query)[0]
 | 
	
		
			
			| 112 | 113 |              except:
 | 
	
		
			
			| 113 | 114 |                  content = ""
 | 
	
		
			
			| 114 |  | -            results.append({'url': url, 'title': title, 'content': content})
 | 
	
		
			
			|  | 115 | +            results.append({
 | 
	
		
			
			|  | 116 | +                'url': to_string(url),
 | 
	
		
			
			|  | 117 | +                'title': to_string(title),
 | 
	
		
			
			|  | 118 | +                'content': to_string(content),
 | 
	
		
			
			|  | 119 | +            })
 | 
	
		
			
			| 115 | 120 |      else:
 | 
	
		
			
			| 116 | 121 |          for url, title, content in zip(
 | 
	
		
			
			| 117 | 122 |              query(json, url_query),
 | 
	
		
			
			| 118 | 123 |              query(json, title_query),
 | 
	
		
			
			| 119 | 124 |              query(json, content_query)
 | 
	
		
			
			| 120 | 125 |          ):
 | 
	
		
			
			| 121 |  | -            results.append({'url': url, 'title': title, 'content': content})
 | 
	
		
			
			|  | 126 | +            results.append({
 | 
	
		
			
			|  | 127 | +                'url': to_string(url),
 | 
	
		
			
			|  | 128 | +                'title': to_string(title),
 | 
	
		
			
			|  | 129 | +                'content': to_string(content),
 | 
	
		
			
			|  | 130 | +            })
 | 
	
		
			
			| 122 | 131 |  
 | 
	
		
			
			| 123 | 132 |      if not suggestion_query:
 | 
	
		
			
			| 124 | 133 |          return results
 |