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 do not work #4

Open
jmas opened this issue Aug 30, 2016 · 0 comments
Open

HTML entities do not work #4

jmas opened this issue Aug 30, 2016 · 0 comments
Labels

Comments

@jmas
Copy link

jmas commented Aug 30, 2016

Hello. Have an issue with HTML Entities started with & and finished with ;.

Example:

export function createTask (task, index) {
  return html`
    <li>
      <label>
        <input type="checkbox" onclick="${onTaskChange}" value=${index} ${task.done ? 'checked': ''} />
        ${task.name}
        <button onclick="${onTaskRemove}" data-index=${index}>&times;</button>
      </label>
    </li>
  `;
}

Here inside <button> tag we see HTML Entity &times; that escaped and do not insert in DOM as correct symbol ×.

Another problem if we instead &times; insert UTF-8 char ×. It do not parsed correctly and insert to DOM broken UTF-8 symbol Г—.

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