Explorar el Código

[fix] description escaping

asciimoo hace 11 años
padre
commit
9bd4459638
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      searx/engines/github.py

+ 2
- 1
searx/engines/github.py Ver fichero

@@ -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