Hi everyone, Can't believe I haven't stumbled upon this before. I was just doing URL decoding of some AJAX submitted data (encoded using EncodeURIComponent() JS function), when I noticed that apparently OpenBD (and CF?) decodes URL parameters automatically.
Test case: <cfset test1 = url.test> <cfset test2 = "foo%26bar%2Bblah%25percent"> <cfoutput> test1 == urldecode(test1) #test1# == "#urldecode(test1)#" #test2# == "#urldecode(test2)#" </cfoutput> Output for test.cfm?test=foo%26bar%2Bblah%25percent test1 == urldecode(test1) foo&bar+blah%percent == "foo&bar blah rcent" foo%26bar%2Bblah%25percent == "foo&bar+blah%percent" Is this intentional? I would expect the url.test (and test1) to be equal to test2, but they're not. Are URL parameters really supposed to be automatically decoded - even when <cfparam> is not used? Until now I have always used URLDecode() to handle incoming data, but that seems to royally break things now. Thanks! Jari -- -- online documentation: http://openbd.org/manual/ http://groups.google.com/group/openbd?hl=en --- You received this message because you are subscribed to the Google Groups "Open BlueDragon" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
