Skip to content

Instantly share code, notes, and snippets.

@adamcameron
Created June 2, 2014 11:39
Show Gist options
  • Save adamcameron/d680bb8dce2845223f79 to your computer and use it in GitHub Desktop.
Save adamcameron/d680bb8dce2845223f79 to your computer and use it in GitHub Desktop.
Trying to work out what the problem Andreas is having
<cfset original = "test string with a trailing ##">
<cfset encoded = urlEncodedFormat(original)>
<cfset decoded = urlDecode(encoded)>
<cfdump var="#[original,encoded,decoded]#">
<!---
outputs:
array
1 test string with a trailing #
2 test%20string%20with%20a%20trailing%20%23
3 test string with a trailing #
--->
@cfexpert
Copy link

cfexpert commented Jun 2, 2014

Call a template like so: test.cfm?p=f%25%26%3F%23

test.cfm
<cfscript>
param name="url.p" default="";
writeOutput( urlDecode( url.p ) );
</cfscript>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment