mirror of https://github.com/searx/searx
[fix] remove result escaping from engine
This commit is contained in:
parent
1a82ed6f54
commit
4676e1dcde
|
@ -15,7 +15,6 @@
|
||||||
from json import loads
|
from json import loads
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
from urlparse import urljoin
|
from urlparse import urljoin
|
||||||
from xml.sax.saxutils import escape
|
|
||||||
|
|
||||||
# engine dependent config
|
# engine dependent config
|
||||||
categories = ['images']
|
categories = ['images']
|
||||||
|
@ -57,11 +56,11 @@ def response(resp):
|
||||||
# parse results
|
# parse results
|
||||||
for result in response_json['photos']:
|
for result in response_json['photos']:
|
||||||
url = urljoin(base_url, result['url'])
|
url = urljoin(base_url, result['url'])
|
||||||
title = escape(result['name'])
|
title = result['name']
|
||||||
# last index is the biggest resolution
|
# last index is the biggest resolution
|
||||||
img_src = result['image_url'][-1]
|
img_src = result['image_url'][-1]
|
||||||
thumbnail_src = result['image_url'][0]
|
thumbnail_src = result['image_url'][0]
|
||||||
content = escape(result['description'] or '')
|
content = result['description'] or ''
|
||||||
|
|
||||||
# append result
|
# append result
|
||||||
results.append({'url': url,
|
results.append({'url': url,
|
||||||
|
|
Loading…
Reference in New Issue