John,

On 1/15/2004 at 10:07, you wrote:

JG> I think I'll have to manually escape each special
JG> character with <cfset mystring = Replace(mystring, "'", "\'",
JG> "ALL")>

JG>  Maybe you have a better solution?

If CF4 supports replacelist():

<cfscript>
        mystring="foo to the bar";
        lstbad="foo,bar";
        lstgood="\foo,\bar";
        mystring=replacelist(mystring,lstbad,lstgood);
</cfscript>

This is probably not a very efficient approach if your code is heavily
trafficked, but nothing else comes to mind...

~ Ubqtous ~
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to