mathiasbynens / he

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

Don’t escape printable ASCII symbols (except <>"'&) #1

Closed mathiasbynens closed 11 years ago

mathiasbynens commented 11 years ago

Currently, some symbols like + get escaped (e.g. &plus;) simply because there exists a named character reference for them. However, it’s not really necessary to encode these symbols, since they’re printable ASCII already.

We should filter these out in data.js and make sure they don’t end up in encodeMap.