summaryrefslogtreecommitdiff
path: root/cherrypy/_cpcompat.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-09-04 11:36:37 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-09-04 11:36:37 -0400
commita7bb4a1416073bf93ab0217099d063810d630818 (patch)
treec93f7cd36d3dc40147e78f79b04b657d04a9ed86 /cherrypy/_cpcompat.py
parenta14faa1a1d415191fcbd9c27e9d221232cd52dfa (diff)
downloadcherrypy-git-a7bb4a1416073bf93ab0217099d063810d630818.tar.gz
Remove _cpcompat.escape_html
Diffstat (limited to 'cherrypy/_cpcompat.py')
-rw-r--r--cherrypy/_cpcompat.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/cherrypy/_cpcompat.py b/cherrypy/_cpcompat.py
index 884f626e..250565f9 100644
--- a/cherrypy/_cpcompat.py
+++ b/cherrypy/_cpcompat.py
@@ -90,20 +90,3 @@ else:
# Python 3.2 and earlier
Timer = threading._Timer
Event = threading._Event
-
-# html module come in 3.2 version
-try:
- from html import escape
-except ImportError:
- from cgi import escape
-
-
-# html module needed the argument quote=False because in cgi the default
-# is False. With quote=True the results differ.
-
-def escape_html(s, escape_quote=False):
- """Replace special characters "&", "<" and ">" to HTML-safe sequences.
-
- When escape_quote=True, escape (') and (") chars.
- """
- return escape(s, quote=escape_quote)