summaryrefslogtreecommitdiff
path: root/paste/urlmap.py
diff options
context:
space:
mode:
Diffstat (limited to 'paste/urlmap.py')
-rw-r--r--paste/urlmap.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/paste/urlmap.py b/paste/urlmap.py
index f721f2d..4ba19c1 100644
--- a/paste/urlmap.py
+++ b/paste/urlmap.py
@@ -6,7 +6,7 @@ Map URL prefixes to WSGI applications. See ``URLMap``
import re
import os
-import cgi
+import html
try:
# Python 3
from collections import MutableMapping as DictMixin
@@ -114,12 +114,12 @@ class URLMap(DictMixin):
',\n '.join(map(repr, matches)))
else:
extra = ''
- extra += '\nSCRIPT_NAME: %r' % cgi.escape(environ.get('SCRIPT_NAME'))
- extra += '\nPATH_INFO: %r' % cgi.escape(environ.get('PATH_INFO'))
- extra += '\nHTTP_HOST: %r' % cgi.escape(environ.get('HTTP_HOST'))
+ extra += '\nSCRIPT_NAME: %r' % html.escape(environ.get('SCRIPT_NAME'))
+ extra += '\nPATH_INFO: %r' % html.escape(environ.get('PATH_INFO'))
+ extra += '\nHTTP_HOST: %r' % html.escape(environ.get('HTTP_HOST'))
app = httpexceptions.HTTPNotFound(
environ['PATH_INFO'],
- comment=cgi.escape(extra)).wsgi_application
+ comment=html.escape(extra)).wsgi_application
return app(environ, start_response)
def normalize_url(self, url, trim=True):