can't you escape the stuff first and then do the <br> stuff??? or is that
not an option?
----- Original Message -----
From: "Paul Fennell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 12:54 PM
Subject: [ cf-dev ] < > to < and >
>
>
> Ok I have a bit of code that does a replace on a string changing tabs
> and crs to <BR> tags
>
> But I also want to escape < > to < and >
>
>
>
> <cfscript>
>
> function textareaformat(str)
>
> {
>
> newstr = replace(str, chr(10),'<br>','ALL');
>
> newstr = replace(newstr, chr(13),'<br>','ALL');
>
> newstr = replace(newstr, chr(60),'<','ALL');
>
> newstr = replace(newstr, chr(62),'>','ALL');
>
> return newstr;
>
> }
>
> </cfscript>
>
>
>
> looks good .. heh but .. of course that will replace the < > in the BR
> to < and > as well :-)
>
> heheh
>
>
>
> so I ask how do I combine these two different actions into one function
> - :-)
>
> retaining <BR> and having < > escaped to < and > with out
> affecting the <br>
>
>
>
> - Paul
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.538 / Virus Database: 333 - Release Date: 10/11/2003
>
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]