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

What does/should Handlebars escaping escape? #1114

Closed
greaber opened this issue Oct 4, 2015 · 4 comments
Closed

What does/should Handlebars escaping escape? #1114

greaber opened this issue Oct 4, 2015 · 4 comments
Labels

Comments

@greaber
Copy link

greaber commented Oct 4, 2015

All HTML escaping systems escape <, >, &, ', and ". The Handlebars docs say it also escapes , and a glance at the code suggests is escapes not only but also =. So it seems like the docs are wrong? Also, why escape ``` or =?

@kpdecker kpdecker added the docs label Oct 4, 2015
@kpdecker
Copy link
Collaborator

kpdecker commented Oct 4, 2015

= was added recently and we missed adding that to the docs. There are possible XSS attacks that are mitigated by each of those escapes. Ex: #1083

We need to update the docs to include the = escape as well.

@greaber
Copy link
Author

greaber commented Oct 4, 2015

Yeah, I almost mentioned that I could see that escaping = seems like it would make it much less likely that forgetting to quote attribute values would lead to an exploit. But what is the ``` issue?

@kpdecker
Copy link
Collaborator

kpdecker commented Oct 4, 2015

I believe that it's something specific to IE. If you look through the commit history on the repo you can track it down.

@greaber
Copy link
Author

greaber commented Oct 4, 2015

Yep, this article confirms that IE (at least through version 10, which was current when it was written) will treat ``` as a quoting character like ' and `"`.

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

No branches or pull requests

2 participants