Created
December 7, 2014 07:00
-
-
Save oxguy3/18d92821fe931945c86f to your computer and use it in GitHub Desktop.
A function for decoding html entities in an html string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function htmlDecode( input ) { | |
return String(input) | |
.replace(/&/g, '&') | |
.replace(/"/g, '"') | |
.replace(/</g, '<') | |
.replace(/>/g, '>'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment