Fix for escape() error

pull/664/head
Simon Willison 2020-02-04 12:13:33 -08:00
rodzic 6d672fe34c
commit 19d4406f56
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -84,7 +84,7 @@ class BaseView(AsgiView):
if request and request.args.get("_context") and self.ds.config("template_debug"): if request and request.args.get("_context") and self.ds.config("template_debug"):
return Response.html( return Response.html(
"<pre>{}</pre>".format( "<pre>{}</pre>".format(
escape(json.dumps(template_context, default=repr, indent=4)) jinja2.escape(json.dumps(template_context, default=repr, indent=4))
) )
) )
return Response.html(await self.ds.render_template( return Response.html(await self.ds.render_template(