You need to remove white-spaces from Form or URL struct or any other struct.
Loop through the struct and use trim function to remove white-spaces.
Use the
StructTrimAllKeys(<struct>)
function defined and explained here:
Function (updated as per Phill's comment):
<cffunction name = "StructTrimAllKeys" returntype="struct"
hint="">
<cfargument name = "structVal" type = "struct" required =
"yes" />
<cfset var key = "" />
<!--- loop all keys in the struct and if its a simple value,
trim() it. --->
<cfloop collection="#structVal#" item="key">
<cfif IsSimpleValue(structVal[key])>
<cfset structVal[key] = trim(structVal[key]) />
</cfif>
</cfloop>
<cfreturn structVal />
</cffunction>
Example usage:
<cfoutput> #StructTrimAllKeys(Form)# </cfoutput> <cfoutput> #StructTrimAllKeys(URL)# </cfoutput>
+