Skip to content

Instantly share code, notes, and snippets.

@darkhelmet
Created November 6, 2009 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkhelmet/228398 to your computer and use it in GitHub Desktop.
Save darkhelmet/228398 to your computer and use it in GitHub Desktop.
String.prototype.unescape = function() {
var node = document.createElement('div');
node.innerHTML = this;
if('undefined' == typeof(node.innerText)) {
return node.textContent; // FF
}
return node.innerText; // IE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment