summaryrefslogtreecommitdiffstats
path: root/Lib/cgitb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/cgitb.py')
-rw-r--r--Lib/cgitb.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/cgitb.py b/Lib/cgitb.py
index 3f36ab1..e5db383 100644
--- a/Lib/cgitb.py
+++ b/Lib/cgitb.py
@@ -183,7 +183,8 @@ function calls leading up to the error, in the order they occurred.</p>'''
%s
-->
-''' % ''.join(traceback.format_exception(etype, evalue, etb))
+''' % pydoc.html.escape(
+ ''.join(traceback.format_exception(etype, evalue, etb)))
def text(einfo, context=5):
"""Return a plain text document describing a given traceback."""