I'm building a form cleaner utility method that might help thwart some XSS, clean my fields up, etc. Know I can't stop it all. Didnt see anything on riaforge exactly like what I'm lookin for here.
Here's what I've got so far. Anyone have anything to add? <cffunction name="cleanFormFields" access="public" output="false" returntype="struct"> <cfargument name="formStruct"> <cfset var form = ""> <cfset var thisField = ""> <cfloop list="#arguments.formStruct.fieldnames#" index="thisField"> <cfset form[thisField] = trim(form[thisField])> <cfset form[thisField] = htmlEditFormat(form[thisField])> </cfloop> <cfdump var="#form#"><cfabort> <cfreturn form> </cffunction> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335691 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm