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

Edge case: does not decode example string on w3 spec #50

Open
youming-lin opened this issue Oct 7, 2016 · 4 comments
Open

Edge case: does not decode example string on w3 spec #50

youming-lin opened this issue Oct 7, 2016 · 4 comments
Assignees

Comments

@youming-lin
Copy link

youming-lin commented Oct 7, 2016

I was testing encode/decode via https://mothereff.in/html-entities while cross-referencing the spec, and I noticed that he is not able to decode certain named references correctly. On the w3 spec page, it lists this example string, I'm &notit; I tell you, which should be parsed into I'm ¬it; I tell you with a parse error. he returns the string un-parsed. It appears that he is not able to parse legacy named references if there are one or more alphanumeric characters after the legacy named reference followed by a semicolon ; character. he parses correctly if the tail of alphanumeric characters ends with a character other than semicolon.

@mathiasbynens
Copy link
Owner

Good catch! Thanks for the excellent bug report.

@RReverser
Copy link
Contributor

Got bitten by this too, but can't find what would be the way to fix it in he...

@David263
Copy link

David263 commented Sep 4, 2019

Surely this has been fixed by now...

@rakend
Copy link

rakend commented Oct 2, 2019

128th character in ASCII table which looks like a small square when printed with this code alert(String.fromCharCode(128)); is not being encoded. While it's next character 129 in ASCII is encoded as .

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

5 participants