Another solution to this is to use htmlEditFormat() when outputting the data in a form field.
<input type="text" value="#htmlEditFormat(query.column)#"> M!ke -----Original Message----- From: Mik Muller [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 9:53 AM To: CF-Talk Subject: Re: Neat trick for cleaning formfields You might also want to prepare any text for SQL inserting if that's the final destination for the form data. I have a UDF that does that for me. I'm sure it's not the best method, but it prevents data from having ' or even " which can mess up input type=text form fields later. It was written a very long time ago, and now that I think about it it should probably be a rereplace and include other characters. function formIn(string) { if (len(trim(string))) return trim(replace(replace(string,'"',""","all"),"'","''","all")); else return " "; } Mik ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271711 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4