mathiasbynens / he

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

Legacy named character references not always handled correctly #67

Closed mathiasbynens closed 6 years ago

mathiasbynens commented 6 years ago
he.decode('&xxx; &xxx &ampthorn; &ampthorn &ampcurren;t &ampcurrent');

Expected:

'&xxx; &xxx þ &thorn ¤t &current'

Actual:

'&xxx; &xxx &ampthorn; &thorn &ampcurren;t &current'