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

mustache html escaping #497

Closed
benmmurphy opened this issue Jul 19, 2016 · 3 comments
Closed

mustache html escaping #497

benmmurphy opened this issue Jul 19, 2016 · 3 comments

Comments

@benmmurphy
Copy link
Contributor

by default mustache escapes html so '&<> characters become html entities. it can be avoided by using {{{}}} instead of {{}} but this is really bizzare behaviour because html probably has nothing to do with the content type of the what is being templated. We template erlang term files where it would only make sense to escape " -> " (and other erlang string escapes)

@lrascao
Copy link
Collaborator

lrascao commented Sep 29, 2016

i think this is a consequence of using bbmustache as the mustache template that automatically performs html escaping, maybe the project maintainer might be willing to incorporate an erlang escaping mode.

@lrascao
Copy link
Collaborator

lrascao commented Oct 14, 2016

A request ticket has been opened in the bbmustache project soranoba/bbmustache#16

@lrascao
Copy link
Collaborator

lrascao commented May 15, 2017

i guess this can be closed, we can re-open it if some development occurs in bbmustache

@lrascao lrascao closed this as completed May 15, 2017
galdor added a commit to galdor/relx that referenced this issue Nov 21, 2020
The mustache template engine escapes HTML entities by default. This is quite
annoying since we are not generating HTML pages in a web application. This
problem was already referenced in
erlware#497. Now that bbmustache supports a way
to disable escaping by default, there is no reason not to do it.

Additionally, escaping is already disabled in rebar3 templates (see
fe8626ff7de635cc84da61b8b3deb553fe9572c9), so having both templating systems
behave the same way makes sense.
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