Convert HTML Entities - is it a bug?

This bug is a little bizarre. I’m guessing you copy/pasted the entities from the test descriptions, which “escape” the entities in a rather unusual way, and as a result, you get this:

'&​amp;' === '&' //false
'&​amp;'.length //6
'&​amp;'.split(''); //["&", "​", "a", "m", "p", ";"]
'&​amp;'.codePointAt(1).toString(16); //"200b"

That codepoint, U+200B, is a zero-width space. It’s one of a few zero-width characters in Unicode that are very useful for specialized applications but can also poop on your parade when you least expect it.

Delete all those zero-width spaces and your code should pass the test cases with no problems.