Double and triple mustaches #26

Roman600 opened this Issue Mar 16, 2012 · 2 comments


None yet
2 participants

In mustache.js they use triple mustaches to render unescaped content:

All variables are HTML-escaped by default.
If you want to render unescaped HTML, use the triple mustache: {{{name}}}.
You can also use & to unescape a variable.

Triple mustaches in Nustache don`t work.
Since I share templates between client and server, this forces me to use double mustaches everywhere, and I get unneccesary HTML-escaping of data, which is already escaped (in database).

It would be great if triple mustaches for unescaped data worked in Nustache as well.


jdiamond commented Mar 16, 2012

Triple staches are supposed to work. I just tested them and they do as long as there's no whitespace inside the staches. I'll fix it so that whitespace is allowed inside in just a bit.

@jdiamond jdiamond closed this in 00651bc Mar 16, 2012

Triple mustaches with whitespaces are now working fine. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment