working pond

This commit is contained in:
Jeena 2014-02-04 21:44:02 +01:00
parent 08639f9999
commit 35f4825596
5 changed files with 195 additions and 3 deletions

View file

@ -49,6 +49,12 @@ String.prototype.escapeHTML = function() {
});
}
String.prototype.htmlDecode = function() {
var e = document.createElement('div');
e.innerHTML = this;
return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
}
String.prototype.stripHTML = function() {
return this.replace(/(<([^>]+)>)/ig, "");
}