Created
March 25, 2015 14:19
-
-
Save jesusgoku/6ff87d67bf8f9fce503f to your computer and use it in GitHub Desktop.
Unescape HTML from Javascript
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 (document) { | |
var Utility = function(){}; | |
utility.prototype.htmlDecode = function (html) { | |
var e = document.createElement('div'); | |
e.innerHTML = html; | |
return 0 < e.nodeChilds.length ? e.nodeChilds[0].nodeValue : null; | |
}; | |
return Utility; | |
})(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment