diff options
| author | lorddavidiii <lorddavidiii@qi0.de> | 2019-11-16 21:05:08 +0100 |
|---|---|---|
| committer | lorddavidiii <lorddavidiii@qi0.de> | 2019-11-16 21:58:25 +0100 |
| commit | 5e5ff0cbf83fc6929545e1ca3f936a162019a2aa (patch) | |
| tree | bfe680275a7cb1a37d879c824565dd10bb245f12 /searx/webapp.py | |
| parent | 42d5e2c02cd4715a0e09411efbb249ef5d8defed (diff) | |
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/webapp.py')
| -rw-r--r-- | searx/webapp.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 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 exit exit(1) -from cgi import escape +try: + from cgi import escape +except: + from html import escape from datetime import datetime, timedelta from time import time from werkzeug.contrib.fixers import ProxyFix |