From 606038351e0e05fb96b6560d459be700bb40625a Mon Sep 17 00:00:00 2001 From: abersheeran Date: Sat, 17 Aug 2019 00:40:27 +0800 Subject: [PATCH] Fix html escape --- starlette/middleware/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starlette/middleware/errors.py b/starlette/middleware/errors.py index 1f2c40b4..a3fe4f35 100644 --- a/starlette/middleware/errors.py +++ b/starlette/middleware/errors.py @@ -222,7 +222,7 @@ class ServerErrorMiddleware: exc_html += self.generate_frame_html(frame, center_lineno, is_collapsed) is_collapsed = True - error = f"{traceback_obj.exc_type.__name__}: {html.escape(traceback_obj)}" + error = f"{traceback_obj.exc_type.__name__}: {html.escape(str(traceback_obj))}" return TEMPLATE.format(styles=STYLES, js=JS, error=error, exc_html=exc_html)