Could you do something like - 

function parse(str)
{
  str = Replace(str, "<", "&lt;" , "all");
  str = Replace(str, "<", "&gt;" , "all");

  str = evaluate(str);
  
  str = Replace(str, "&gt;", "<"  , all);
  str = Replace(str, "&lt;", ">"  , all);

  return str;
}

of course you can't use any &gt; or &lt; characters... but that could be got around 
by using ascii # values.

Never tested it - but the theory should be sound ;o)

Mark

------------------------------------------------------------------
[EMAIL PROTECTED]
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]


Quoting Kevin Faulkner <[EMAIL PROTECTED]>:

> Hi all,
> 
>    Beginning to regret going this route but too late to turn back now!
> Basicaly I'm in a situation where I have a string which may or may not
> contain variables and tags within it...
> 
>   eg <CFSET testString = "I am a string, to be shown #now()#, with <B>This
> is bold</B>">
> 
>   But I'm having difficulty displaying it, #testString# parses the HTML tags
> but not the CF, whereas evaluate(testString) does exactly the opposite,
> handling the CF but falling over on the '<' ("Yes I'm sure I didn't mean
> LT!!")...  Is there a way to handle both?
> 
> Kev
> 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004
> 
> 
> 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to