Mike, Before you do a massive search a replace... Consider just looping over the FORM scope in your site header (before HTML tag) and update the FORM scope values to be "input" friendly. This way, your inputs don't have to change, and the data cleaning is in a single place.
...................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: Mik Muller [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 11:12 AM To: CF-Talk Subject: RE: Neat trick for cleaning formfields Well go-o-o-o-o-lly. You learn a new tag every day. I don't know how I missed that one. I think it's time for a massive search and replace. Mik At 11:02 AM 3/6/2007, Dawson, Michael wrote: >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 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271725 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

