Dotiac::DTL::Tag::autoescape - The {% autoescape [on/off] %} tag
Template file:
{% autoescape on %} This variable will be HTML escaped: {{ "&'\"" }} {% endautoescape %} {% autoescape off %} This variable will NOT be HTML escaped: {{ "&'\"" }} {% endautoescape %}
Controls the autoescape behavior of an area.
Optional parameter:
Autoescaping is on for that whole area till {% endautoescape %}
Defaults to no change at all.
This won't work around blocks in an extend:
{% extend "main.html %} {% autoescape off %} {% block content %} This variable will be HTML escaped: {{ "&'\"" }}, even if there is an autoescape tag setting it off around it. {% endblock content %} {% endautoescape %}
If you but the autoescape tags into the block, it will work:
{% extend "main.html %} {% block content %} {% autoescape off %} This variable will NOT be HTML escaped: {{ "&'\"" }} {% endautoescape %} {% endblock content %}
http://www.djangoproject.com, Dotiac::DTL
Dotiac::DTL was built according to http://docs.djangoproject.com/en/dev/ref/templates/builtins/.
Marc-Sebastian Lucksch
perl@marc-s.de
To install Dotiac::DTL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dotiac::DTL
CPAN shell
perl -MCPAN -e shell install Dotiac::DTL
For more information on module installation, please visit the detailed CPAN module installation guide.