mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 04:41:00 +00:00
[fix] description escaping
This commit is contained in:
parent
650d57fba7
commit
9bd4459638
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
from json import loads
|
from json import loads
|
||||||
|
from cgi import escape
|
||||||
|
|
||||||
categories = ['it']
|
categories = ['it']
|
||||||
|
|
||||||
|
@ -20,6 +21,6 @@ def response(resp):
|
||||||
for res in search_res['items']:
|
for res in search_res['items']:
|
||||||
title = res['name']
|
title = res['name']
|
||||||
url = res['html_url']
|
url = res['html_url']
|
||||||
content = res['description']
|
content = escape(res['description'][:500])
|
||||||
results.append({'url': url, 'title': title, 'content': content})
|
results.append({'url': url, 'title': title, 'content': content})
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in a new issue