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
webapp.py: use html.escape if cgi.escape is not available
lorddavidiii5e5ff0cbf83f
diff --git a/searx/engines/framalibre.py b/searx/engines/framalibre.pyindex 146cdaeec..f3441fa5f 100644--- a/searx/engines/framalibre.py+++ b/searx/engines/framalibre.py@@ -10,7 +10,10 @@@parse url, title, content, thumbnail, img_src"""-from cgi import escape+try:+ from cgi import escape+except:+ from html import escapefrom lxml import htmlfrom searx.engines.xpath import extract_textfrom searx.url_utils import urljoin, urlencodediff --git a/searx/webapp.py b/searx/webapp.pyindex 3bb29140a..183bf1975 100644--- a/searx/webapp.py+++ b/searx/webapp.py@@ -41,7 +41,10 @@ except:logger.critical("cannot import dependency: pygments")from sys import exitexit(1)-from cgi import escape+try:+ from cgi import escape+except:+ from html import escapefrom datetime import datetime, timedeltafrom time import timefrom werkzeug.contrib.fixers import ProxyFix