replace('dill"s', '"', "'", "all")
In other words, where you are explicitly writing double-quotes (like for
the find string) wrap in single quotes, and where you are explicitly
writing single quotes (like the replace string) wrap in double quotes.
--Ben Doom
Rick Sanders wrote:
> Hey list,
>
>
>
> I'm trying to replace a double quote in a text field to a single quote. I've
> tried using ReReplace, but it still crashes the Cold Fusion server.
>
> What I've done is this:
>
> <cfoutput>#REReplace("dill"s",""","'","ALL")#</cfoutput>
>
>
>
> See, users tend to like using double quotes in a text field which breaks the
> SQL query. How can i check if there's a double quote in a #form.textfield#
> and remove it?
>
>
>
> Thanks in advance.
>
>
>
> Rick Sanders
>
> Webenergy
>
> Canada: 902-401-7689
>
> USA: 919-799-9076
>
> Canada: www.webenergy.ca
>
> USA: www.webenergyusa.com
>
>
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292466
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4