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

Add note about nested tagged templates and arrays. #73

Merged
merged 1 commit into from
Jun 8, 2016

Conversation

gnarf
Copy link
Contributor

@gnarf gnarf commented Jun 8, 2016

Just a note...

Also, what escaping does the tagged template helper use for attributes / innerText/HTML? I'd like to add that to the docs as well.

@tbranyen
Copy link
Owner

tbranyen commented Jun 8, 2016

Awesome thanks! diffHTML doesn't do any escaping, but does do HTML entity decoding to support Unicode/HTML5 entities in text nodes. In the transform branch it will only decode HTML entities if there is an ampersand present in the string (for perf reasons).

Another thing we should note is that in the case of things like srcdoc diffHTML currently doesn't support parsing unescaped markup from attributes. So this will not work:

<iframe srcdoc="<center>of attention</center>"></iframe>

But this will:

<iframe srcdoc="&#x3C;center&#x3E;of attention&#x3C;/center&#x3E;"></iframe>

@tbranyen tbranyen merged commit 9a7a1b5 into tbranyen:master Jun 8, 2016
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.

2 participants