Skip to content

Instantly share code, notes, and snippets.

Created Dec 7, 2014
What would you like to do?
A function for decoding html entities in an html string
function htmlDecode( input ) {
return String(input)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment