[fix] Google image with special chars

It seems like Google image is doing a double urlencode on the url of the images. So we need to unquote once before sending to the browser the urls.
It solves the 404 we could see with some image with specials chars in url. 
Exemple https://searx.laquadrature.net/?q=etes&pageno=1&category_images (there are two of those in the list)
This commit is contained in:
Cqoicebordel 2014-12-08 21:12:50 +01:00
parent 9517f7a6e7
commit b973081134
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
# @stable yes (but deprecated)
# @parse url, title, img_src
from urllib import urlencode
from urllib import urlencode,unquote
from json import loads
# engine dependent config
@ -52,7 +52,7 @@ def response(resp):
results.append({'url': href,
'title': title,
'content': '',
'img_src': result['url'],
'img_src': unquote(result['url']),
'template': 'images.html'})
# return results