From: Armin Ronacher Date: Fri, 6 Jan 2017 20:35:46 +0000 (+0100) Subject: Add note on HTML usage of tojson filter X-Git-Tag: 2.9~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e273b3af244cec7591ce0a3df6a9b456fbbf6781;p=thirdparty%2Fjinja.git Add note on HTML usage of tojson filter --- 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