SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] content escaping - closes #441
Adam Tauber0ad272c5cb81
diff --git a/searx/engines/google.py b/searx/engines/google.pyindex 0e78a9e2c..c8299d04b 100644--- a/searx/engines/google.py+++ b/searx/engines/google.py@@ -9,6 +9,7 @@# @parse url, title, content, suggestionimport re+from cgi import escapefrom urllib import urlencodefrom urlparse import urlparse, parse_qslfrom lxml import html@@ -167,7 +168,7 @@ def parse_url(url_string, google_hostname):def extract_text_from_dom(result, xpath):r = result.xpath(xpath)if len(r) > 0:- return extract_text(r[0])+ return escape(extract_text(r[0]))return None@@ -273,7 +274,7 @@ def response(resp):# parse suggestionfor suggestion in dom.xpath(suggestion_xpath):# append suggestion- results.append({'suggestion': extract_text(suggestion)})+ results.append({'suggestion': escape(extract_text(suggestion))})# return resultsreturn results