You can do a <cfset NewString = Replace(String, "#CHR(10)##CHR(13)#",
"<br>", "ALL")> to replace the CR/LF. I may have those backwards (the 10
and 13), but that will give you the results you're looking for.
As far as the double-spaces, you can use <cfset NewString = Replace(String,
" ", " ", "ALL")>
HTH
Hatton Humphrey
-----Original Message-----
From: Chad Elley [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 6:50 PM
To: CF-Talk
Subject: String Formating
I have a form which I am dumping into a database. I need to keep the
formatting that was used when submitting form (line breaks and spaces).
What I would like to do is replace spaces and breaks with " " and
"<br>"
How do I replace line breaks with a <br>?
By the way, I dont want to use <pre></pre> to format the text.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists