mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-27 11:10:19 -06:00
8bd17cb433
in 'utils' module, earlier the function -'escape(...)' was converting the strings to bytes, and that's reason, it was not working on Python 3.
19 lines
443 B
Python
19 lines
443 B
Python
##########################################################################
|
|
#
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
#
|
|
# Copyright (C) 2013 - 2016, The pgAdmin Development Team
|
|
# This software is released under the PostgreSQL Licence
|
|
#
|
|
#########################################################################
|
|
|
|
"""Utilities for HTML"""
|
|
|
|
import cgi
|
|
|
|
|
|
def safe_str(x):
|
|
return cgi.escape(x).encode(
|
|
'ascii', 'xmlcharrefreplace'
|
|
).decode()
|