Code:
String.prototype.stripHTML=function(){
return this.replace(/\&/g,"\&amp;").replace(/\</g,"\&lt;").replace(/\gt/g,"\&gt;")
}
Converts "<b>hi</b>" into "&lt;b&gt;hi&lt;/b&gt;"