mathiasbynens / he

A robust HTML entity encoder/decoder written in JavaScript.
https://mths.be/he
MIT License
3.43k stars 255 forks source link

he.decode(`&copy123`) #3

Closed mathiasbynens closed 11 years ago

mathiasbynens commented 11 years ago
he.decode('&copy123');
// → '&copy123'

It should be '©123'.

he.decode('∉ &noti;');
// → '∉ &noti;'

It should be '∉ ¬i;'.

See regexCharacterReferencesThatHaveASemicolonFreeCharacterReferenceAsSubstring (lolol) in https://github.com/mathiasbynens/mothereff.in/blob/master/ampersands/eff.js.