aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib-python/2.7/cgitb.py')
-rw-r--r--lib-python/2.7/cgitb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib-python/2.7/cgitb.py b/lib-python/2.7/cgitb.py
index 8acc4b75fe..3689f8a4ba 100644
--- a/lib-python/2.7/cgitb.py
+++ b/lib-python/2.7/cgitb.py
@@ -125,7 +125,7 @@ function calls leading up to the error, in the order they occurred.</p>'''
args, varargs, varkw, locals = inspect.getargvalues(frame)
call = ''
if func != '?':
- call = 'in ' + strong(func) + \
+ call = 'in ' + strong(pydoc.html.escape(func)) + \
inspect.formatargvalues(args, varargs, varkw, locals,
formatvalue=lambda value: '=' + pydoc.html.repr(value))
@@ -285,7 +285,7 @@ class Hook:
if self.display:
if plain:
- doc = doc.replace('&', '&amp;').replace('<', '&lt;')
+ doc = pydoc.html.escape(doc)
self.file.write('<pre>' + doc + '</pre>\n')
else:
self.file.write(doc + '\n')