mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added Python 3.8 support. Fixes #5179
1) Upgraded passlib==1.7.1 to passlib==1.7.2 2) Replace unmaintained Flask-Security with maintained Flask-Security-Too package, which is also compatible with python 3.8 3) Other compatibility code changes.
This commit is contained in:
committed by
Akshay Joshi
parent
1964e824c8
commit
915b09255c
@@ -9,9 +9,13 @@
|
||||
|
||||
"""Utilities for HTML"""
|
||||
|
||||
import cgi
|
||||
from pgadmin.utils import IS_PY2
|
||||
|
||||
if IS_PY2:
|
||||
from cgi import escape as html_escape
|
||||
else:
|
||||
from html import escape as html_escape
|
||||
|
||||
|
||||
def safe_str(x):
|
||||
try:
|
||||
@@ -32,4 +36,4 @@ def safe_str(x):
|
||||
x = x.decode('utf-8')
|
||||
except Exception:
|
||||
pass
|
||||
return cgi.escape(x)
|
||||
return html_escape(x, False)
|
||||
|
||||
Reference in New Issue
Block a user