Honestly, your method is solid @Ambikayache & @tim-khorev .
I use it all the time when parsing strings from APIs. There isn’t a built-in decodeEntities() in JavaScript, so yeah, leveraging the browser’s HTML parser is actually the clever move.
Whether through jQuery or native DOM, either way, it’s the go-to for a JavaScript HTML decode situation.
Hope this helped ![]()