(Actually htmlDecode is not used, but it probably should be retained on
symmetry grounds).
// Convert & to "&", < to "<", > to ">" and " to """
String.prototype.htmlEncode = function()
{
return(this.replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,"""));
}
// Convert "&" to &, "<" to <, ">" to > and """ to "
String.prototype.htmlDecode = function()
{
return(this.replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/"/mg,"\""));
}