misc: use force_str to encode exception in error page (#36515)
This commit is contained in:
parent
7b0978cf00
commit
57f96ee3b4
|
@ -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())
|
||||
|
||||
|
|
Loading…
Reference in New Issue