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