diff options
author | asciimoo <asciimoo@gmail.com> | 2013-10-22 23:17:22 +0200 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-10-22 23:17:22 +0200 |
commit | 9bd44596387c8a2fe3bd5c3ec2cf4163c10970ee (patch) | |
tree | 9cb483834119298b9e0040eb6893d22752c5662c /searx/engines/github.py | |
parent | 650d57fba74c9b6f77241490ba8cda824173602d (diff) | |
download | searxng-9bd44596387c8a2fe3bd5c3ec2cf4163c10970ee.tar.gz searxng-9bd44596387c8a2fe3bd5c3ec2cf4163c10970ee.zip |
[fix] description escaping
Diffstat (limited to 'searx/engines/github.py')
-rw-r--r-- | searx/engines/github.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/engines/github.py b/searx/engines/github.py index e6af380d6..591fd14a7 100644 --- a/searx/engines/github.py +++ b/searx/engines/github.py @@ -1,5 +1,6 @@ from urllib import urlencode from json import loads +from cgi import escape categories = ['it'] @@ -20,6 +21,6 @@ def response(resp): for res in search_res['items']: title = res['name'] url = res['html_url'] - content = res['description'] + content = escape(res['description'][:500]) results.append({'url': url, 'title': title, 'content': content}) return results |