Skip to content

Instantly share code, notes, and snippets.

@niesteszeck
niesteszeck / htmlUtil.js
Created Mar 28, 2018
Javascript HTML entities decode
View htmlUtil.js
/**
* 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
*/