Skip to content

Instantly share code, notes, and snippets.

@oxguy3

oxguy3/htmlDecode

Created Dec 7, 2014
Embed
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