summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorlorddavidiii <lorddavidiii@qi0.de>2019-11-16 21:05:08 +0100
committerlorddavidiii <lorddavidiii@qi0.de>2019-11-16 21:58:25 +0100
commit5e5ff0cbf83fc6929545e1ca3f936a162019a2aa (patch)
treebfe680275a7cb1a37d879c824565dd10bb245f12 /searx/engines
parent42d5e2c02cd4715a0e09411efbb249ef5d8defed (diff)
downloadsearxng-5e5ff0cbf83fc6929545e1ca3f936a162019a2aa.tar.gz
searxng-5e5ff0cbf83fc6929545e1ca3f936a162019a2aa.zip
webapp.py: use html.escape if cgi.escape is not available
- cgi.escape was removed in python 3.8 - also use html.escape in framalibre.py
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/framalibre.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/framalibre.py b/searx/engines/framalibre.py
index 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 escape
from lxml import html
from searx.engines.xpath import extract_text
from searx.url_utils import urljoin, urlencode