asciimoo 11 лет назад
Родитель
Сommit
9bd4459638
1 измененных файлов: 2 добавлений и 1 удалений
  1. 2
    1
      searx/engines/github.py

+ 2
- 1
searx/engines/github.py Просмотреть файл

@@ -1,5 +1,6 @@
1 1
 from urllib import urlencode
2 2
 from json import loads
3
+from cgi import escape
3 4
 
4 5
 categories = ['it']
5 6
 
@@ -20,6 +21,6 @@ def response(resp):
20 21
     for res in search_res['items']:
21 22
         title = res['name']
22 23
         url = res['html_url']
23
-        content = res['description']
24
+        content = escape(res['description'][:500])
24 25
         results.append({'url': url, 'title': title, 'content': content})
25 26
     return results