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

HTML entities #49

Open
daryl opened this issue Sep 18, 2016 · 1 comment
Open

HTML entities #49

daryl opened this issue Sep 18, 2016 · 1 comment

Comments

@daryl
Copy link

daryl commented Sep 18, 2016

For some reason I can't use HTML entities.

export default props => {
  return yo`
    <footer class="Footer">
      &copy;
    </footer>
  `;
};

This just renders &copy; instead than the © symbol.

Any ideas?

@shama
Copy link
Collaborator

shama commented Sep 18, 2016

Everything is escaped by default. You can just use © directly or unicode \u00A9. Otherwise you can use innerHTML on the element to insert unescaped HTML.

It escapes everything by default for security but there might be a better way to handle HTML entities without sacrificing security.

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