Escape error messages

This commit is contained in:
shortcutme 2018-11-26 00:08:41 +01:00
parent a1333d8d6b
commit 74e551cf1a
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
import sys
import os
import cgi
from Config import config
@ -31,7 +30,7 @@ def formatException(err=None, format="text"):
file = os.path.split(path)[1]
tb.append("%s line %s" % (file, line))
if format == "html":
return "%s: %s<br><small>%s</small>" % (exc_type.__name__, cgi.escape(str(err)), " > ".join(tb))
return "%s: %s<br><small>%s</small>" % (exc_type.__name__, err, " > ".join(tb))
else:
return "%s: %s in %s" % (exc_type.__name__, err, " > ".join(tb))