kainjow/Mustache

Make HTML escapes optional

a-teammate opened this issue · 2 comments

Currently if we drop in templatedata like vector<int> it will render as vector&lt;int&gt;

A switch for the renderComponent() function would be cool.

I think even a macro would be sufficient if you do not want to add a "bool escape = true" to the arguments list of "render()"
but probably a complete "Options" enum would be better

You can use triple mustache syntax for this:

All variables are HTML escaped by default. If you want to return unescaped HTML, use the triple mustache: {{{name}}}.

See the documentation here.

ah thank you :)