Skip to content

Instantly share code, notes, and snippets.

@oxguy3
Created December 7, 2014 07:00
Show Gist options
  • Save oxguy3/18d92821fe931945c86f to your computer and use it in GitHub Desktop.
Save oxguy3/18d92821fe931945c86f to your computer and use it in GitHub Desktop.
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