//first make Windows style into Unix style str = replace(str,chr(13)&chr(10),chr(10),"ALL"); //now make Macintosh style into Unix style str = replace(str,chr(13),chr(10),"ALL"); //now fix tabs str = replace(str,chr(9),"   ","ALL"); //now return the text formatted in HTML return replace(str,chr(10),"
","ALL");