Is it possible to render a string wrapped in double curly braces in JSRender?
<div>
<p>Can I render {{string}} instead of something looking like a {{customtag}}?</p>
{{if myCustomTag && myTag}}
(<em>{{:myTag}}</em>)
{{/if}}
</div>
So far my attempts at http://www.jsviews.com/ have come back void.
You can use HTML character entities - {
for {
and }
for }
(or equivalently {
and }
)
So in a template,
... {{string}} ...
will render as
... {{string}} ...
In fact the parser is looking for {{
and {^{
as tag delimiters, so you can get away with using:
... {{string}} ...
This is covered by the following new documentation topic: https://www.jsviews.com/#escapetag