misc: use force_str to encode exception in error page (#36515)

This commit is contained in:
Frédéric Péters 2019-11-19 14:32:34 +01:00
parent 7b0978cf00
commit 57f96ee3b4
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ def error_page(error_message, error_title = None, exception = None, continue_to
if exception:
r += htmltext('<p><a id="display-exception">%s</a></p>') % _('View Error Details')
r += htmltext('<pre id="exception"><code>%s</code></pre>') % exception.encode(get_publisher().site_charset)
r += htmltext('<pre id="exception"><code>%s</code></pre>') % force_str(exception)
r += htmltext('</div>')
return htmltext(r.getvalue())