Browse Source

Remove tojson filter in docs

pull/2623/head
Grey Li 7 years ago committed by GitHub
parent
commit
cee8dbb377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      docs/templating.rst

23
docs/templating.rst

@ -97,29 +97,6 @@ by default:
{% from '_helpers.html' import my_macro with context %}
Standard Filters
----------------
These filters are available in Jinja2 additionally to the filters provided
by Jinja2 itself:
.. function:: tojson
:noindex:
This function converts the given object into JSON representation. This
is for example very helpful if you try to generate JavaScript on the
fly.
Note that inside ``script`` tags no escaping must take place, so make
sure to disable escaping with ``|safe`` before Flask 0.10 if you intend
to use it inside ``script`` tags:
.. sourcecode:: html+jinja
<script type=text/javascript>
doSomethingWith({{ user.username|tojson|safe }});
</script>
Controlling Autoescaping
------------------------

Loading…
Cancel
Save