mathiasbynens / he

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

Entities are decoded multiple times #11

Closed fb55 closed 11 years ago

fb55 commented 11 years ago

First of all: Great project, you're taking an interesting approach.

Apparently, you have your own version of a bug I had with my entities module (I'm referring to https://github.com/fb55/node-entities/issues/8 ):

Decoding ''amp;' will first decode the hexadecimal escape, and afterwards the named entity.

Even worse, & will also be decoded twice; you'll end up with &;.

mathiasbynens commented 11 years ago

Good catch!

mathiasbynens commented 11 years ago

Thanks for the great bug report! This is now fixed.