From 9bd44596387c8a2fe3bd5c3ec2cf4163c10970ee Mon Sep 17 00:00:00 2001 From: asciimoo Date: Tue, 22 Oct 2013 23:17:22 +0200 Subject: [PATCH] [fix] description escaping --- searx/engines/github.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searx/engines/github.py b/searx/engines/github.py index e6af380..591fd14 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