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

Document global Mustache.escape overriding capacity #644

Merged
merged 1 commit into from
May 12, 2018

Conversation

paultopia
Copy link
Contributor

Right now, the capacity to override HTML-escaping of strings globally isn't documented. Not only that, but the end of the main issue where this is discussed #244 proposes a solution that got implemented, but with a name that's slightly different from the actual user-facing name. (The proposed solution is to overwrite Mustache.escapeHTML, but the actual name that client-facing code has to override is Mustache.escape --- which is only discovered if you dig down further and find #307.

This capacity is super-useful, especially when combined with custom delimiters (where triple-mustache won't work). For example, I'm using Mustache to template LaTeX right now, and the capacity to override escaping globally is essential to keep me from going nuts.

This PR just adds a line documenting this behavior.

@jakob-bebop
Copy link

Thanks I needed just this :-)

@sorenlouv
Copy link

Bump. Time to merge? :)

@phillipj
Copy link
Collaborator

For sure, thanks for the contribution and the friendly reminder 👍

@phillipj phillipj merged commit 3fddfb1 into janl:master May 12, 2018
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

Successfully merging this pull request may close these issues.

5 participants