From 3290fe452e73bb19d296059e8fee88d168148b22 Mon Sep 17 00:00:00 2001 From: clach04 Date: Sun, 7 Aug 2022 10:18:10 -0700 Subject: [PATCH] #378 explictly set charset for jsonify() https://webhint.io/docs/user-guide/hints/hint-content-type/ reference for best practice Without this Microsoft Edge devtools post a warning --- src/flask/json/provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flask/json/provider.py b/src/flask/json/provider.py index cb6aae80..f0b63731 100644 --- a/src/flask/json/provider.py +++ b/src/flask/json/provider.py @@ -163,7 +163,7 @@ class DefaultJSONProvider(JSONProvider): or ``None`` in debug mode, it will use a non-compact representation. """ - mimetype = "application/json" + mimetype = "application/json; charset=utf-8" """The mimetype set in :meth:`response`.""" def dumps(self, obj: t.Any, **kwargs: t.Any) -> str: