[thelist] ASP / HTML Forms: Carrage Returns in Text Area

Anthony Baratta Anthony at Baratta.com
Mon Aug 11 10:42:14 CDT 2003


At 08:14 AM 8/11/2003, Casey Crookston wrote:

>I'm curious about converting  CRLF's to a <br>... this sounds like we are
>barking up the right tree.  However, when I purposely cause the page to
>error (thus revealing the POST data) a carrage return shows as %0D%0A.  So
>it would seem as if I need to replace every %0D%0A with a <br>.

Quick and Dirty via ASP

function AddHTMLBreaks(varString)
    varString = Replace(varString,vbCRLF,"<br>")
    varString = Replace(varString,vbLF,"<br>")
    varString = Replace(varString,vbCR,"<br>")
    AddHTMLBreaks= varString
end function


-- 
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."



More information about the thelist mailing list