I need to output a portion of client-side handlebars templates, which has tags similar to twig's 'say' tags:
<script type="text/x-handlebars"> {{#view App.MyView}} <h1>Hello world!</h1> {{/view}} </script>
And twig attempts to parse these templates. How do I prevent it? Is it possible to mark a section of a template as plain text?
There is raw tag for this purpose:
<script type="text/x-handlebars"> {% raw %} {{#view App.MyView}} <h1>Hello world!</h1> {{/view}} {% endraw %} </script>
As raw tag is deprecated use verbatim instead.
raw
verbatim
2.1m questions
2.1m answers
60 comments
56.9k users