Thanks taz
But it looks like I left my brain at home as I was also
htlmeditformatting the output
So I was tricking myself  .. ill go home and hide now- 

- Paul 

-----Original Message-----
From: Taz [mailto:[EMAIL PROTECTED] 
Sent: 18 November 2003 13:22
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] < > to &lt and &gt 

I assume you mean that the text may already have <br> tags in it as well
as
breaks, otherwise you'd just have to do the angle brackets before the
breaks.

But if you want to catch all in case people have put code in, just
convert
all <br> tags to a break and then back again at the end.



// convert <br> tags to linebreaks
 newstr = ReplaceNoCase(str, '<br>', chr(10), 'ALL');

// convert angle brackets to html escape codes
 newstr = Replace(newstr, chr(60), '&lt;', 'ALL');
 newstr = Replace(newstr, chr(62), '&gt;', 'ALL');

// convert line breaks to <br> tags
 newstr = Replace(newstr, chr(10), '<br>', 'ALL');
 newstr = Replace(newstr, chr(13), '<br>', 'ALL');


Taz



-- 
** 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]

---
Incoming 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
 

---
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]

Reply via email to