Reputation: 699
I ran into a problem when my template contains some javascript. For instance
<script>var i = /{{([a-z]*)}}/gi;</script>
Sure enough the template interpreter wants to interpret everything that is in double curled braces {{}} as a variable. Now I wonder if there is a way to turn off such a behavior similar to
{% autoescape off %}{% endautoescape %}
.
Upvotes: 0
Views: 52
Reputation: 459
You can use built-in tags: {% verbatim %} and {% endverbatim %} like this:
{% verbatim %}
<script>var i = /{{([a-z]*)}}/gi;</script>
{% endverbatim %}
Upvotes: 2