Encode error repose to bytes

This commit is contained in:
shortcutme 2019-03-16 00:00:35 +01:00
parent bcd721e2ef
commit b981ddadca
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -799,6 +799,7 @@ class UiRequest(object):
self.sendHeader(500)
return self.formatError("Server error", html.escape(message))
@helper.encodeResponse
def formatError(self, title, message, details=True):
import sys
import gevent
@ -826,4 +827,4 @@ class UiRequest(object):
return """
<h1>%s</h1>
<h2>%s</h3>
""" % (title, cgi.escape(message))
""" % (title, html.escape(message))