mathiasbynens / he

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

A new feature suggestion: add an escape option to decode function #88

Open ShuhaoZQGG opened 2 years ago

ShuhaoZQGG commented 2 years ago

I have a special need of decoding a file contains html entities but only escape "&" otherwise it will break another 3rd party library. It will be handy if we have an additional option to escape certain html entites.

Also please kindly suggest me how to do this if there is a way to escape some html entities while decoding.

Thank you.

ShuhaoZQGG commented 2 years ago

My workaround now is to split around the specific html entity, decode each part and then join them back together.