Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globally switch off html escaping #4

Closed
matpen opened this issue Jan 29, 2016 · 2 comments
Closed

Globally switch off html escaping #4

matpen opened this issue Jan 29, 2016 · 2 comments

Comments

@matpen
Copy link

matpen commented Jan 29, 2016

I know that per the specifications, mustache defaults to html escaping. This is however inconvenient when using it for documents different from html. Is there a way to globally turn it off, eg. some equivalent to the javascript version?

@no1msd
Copy link
Owner

no1msd commented Feb 1, 2016

There wasn't before, but that's actually a great idea! I've released a new version, and it's now possible to write:

mstch::config::escape = [](const std::string& str) -> std::string {
  return str;
};

to achieve the result you want.

@no1msd no1msd closed this as completed Feb 1, 2016
@matpen
Copy link
Author

matpen commented Feb 1, 2016

This is amazing!! Thank you for this great solution and a great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants