Skip to content

Instantly share code, notes, and snippets.

@niesteszeck
niesteszeck / htmlUtil.js
Created March 28, 2018 13:03
Javascript HTML entities decode
/**
* Decode HTML entities (like: á, nbsp, etc) to convert them to the correct char
*
* version 1
*
* Inspired by: https://stackoverflow.com/a/41791818/5604354
*
* @param {string} string with html that has entities
* @return {string} decoded string
*/