I meant in context of Hugo / SSGs / js. I explained badly (I meant to politely emphasis I’m very familiar with what it does, mvc, etc, unsure why it’s advocated in this use case). Better stop as the mis-understanding (as you said, off-topic) will interrupt the thread too much, but thanks.
See Pull Request #1052 “Change delimiter enhancement for HUGO” contributed by @marc (a.k.a. @danke-click on GitHub), and the new Issue #1300 “Make go template delimiter configurable” which supercedes Issue #1044 and PR #1052.
I just ran into this conflict using mustache js but found an option to set custom delimiters in the js library.
Just for others reference:
{{ "{{data_binding}}" }}
5 Likes
This doesn’t work outside of any html tag e.g.
{{ "{{example}}" }}<p>{{"{{Test}}"}}</p>{{ "{{example}}" }}
{{"{{"}}example{{"}}"}}<p>{{"{{"}}Test{{"}}"}}</p>{{"{{"}}example{{"}}"}}
Will output properly inside html tags but add unnessary double quotes outside of html tags
"{{example}}"<p>{{Test}}</p>"{{example}}"
"{{example}}"<p>{{Test}}</p>"{{example}}"
I tried safeHTML
and safeHTMLAttr
still I could not get rid of double quotes outside of example.
I want following output
{{example}}<p>{{Test}}</p>{{example}}
no double quotes around example