--- old.py 2014-10-28 04:47:38.622768887 +0100 +++ cgitb.py 2014-10-28 04:46:47.330766405 +0100 @@ -176,7 +176,7 @@ value = pydoc.html.repr(getattr(evalue, name)) exception.append('\n
%s%s =\n%s' % (indent, name, value)) - return head + ''.join(frames) + ''.join(exception) + ''' + result = head + ''.join(frames) + ''.join(exception) + ''' ''' % pydoc.html.escape( ''.join(traceback.format_exception(etype, evalue, etb))) + return str(result.encode('ascii', 'xmlcharrefreplace')) def text(einfo, context=5): """Return a plain text document describing a given traceback."""