String.prototype.replaceAll = function(s1,s2){
return this.replace(new RegExp(s1,"gm"),s2);
}
var textTohtml = function( $str ){
return $str.replaceAll("&", "&").replaceAll("<", "<")
.replaceAll(">", ">")
.replaceAll(String.fromCharCode(32), " ")
.replaceAll(String.fromCharCode(9), " ")
.replaceAll(String.fromCharCode(9), "    ")
.replaceAll(String.fromCharCode(34), """)
.replaceAll(String.fromCharCode(39), "'")
.replaceAll(String.fromCharCode(13), "")
.replaceAll(String.fromCharCode(10), "<br/>")
}