From e273b3af244cec7591ce0a3df6a9b456fbbf6781 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 6 Jan 2017 21:35:46 +0100 Subject: [PATCH] Add note on HTML usage of tojson filter --- jinja2/filters.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jinja2/filters.py b/jinja2/filters.py index 05c2fc45..c71d3b1d 100644 --- a/jinja2/filters.py +++ b/jinja2/filters.py @@ -938,6 +938,8 @@ def do_tojson(eval_ctx, value, indent=None): The indent parameter can be used to enable pretty printing. Set it to the number of spaces that the structures should be indented with. + Note that this filter is for use in HTML contexts only. + .. versionadded:: 2.9 """ policies = eval_ctx.environment.policies -- 2.47.2