tracker issue : CF-4204045

select a category, or use search below
(searches all categories and all time range)
Title:

UrlEncodedFormat Can't Encode % Symbols

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Alex P. / ()

Created: 02/22/2019

Components: Language, String Functions

Versions: 11.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 11,0,16,313933 / CF11U19,CF2016U11,CF2018U4

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 11

Problem Description:
UrlEncodedFormat() no longer escapes the % character properly.

Steps to Reproduce:
<cfset testString = "+" />
<cfoutput>#testString#</cfoutput> <br/>
<cfoutput>#UrlEncodedFormat(testString)#</cfoutput> <br/>
<cfoutput>#UrlEncodedFormat(UrlEncodedFormat(testString))#</cfoutput>

Actual Result:
+
%2B
%2B

Expected Result:
+
%2B
%252B

Any Workarounds:
Use Replace(haystack, "%", "%25", "all") or uninstall CF Hotfix Update 16. Expected result is returned in 11,0,15

Attachments:

Comments:

Applies to valid escape sequences (%GH will be encoded to %25GH) and applies to builtin encoding (such as <cfhttpparam type="formfield" name="test" value="%255F" encoded="yes"/>).
Comment by Evert N.
30444 | March 06, 2019 06:14:46 PM GMT
This is a breaking issue for an app I maintain. We can't update due to this.
Comment by Bradley W.
30544 | March 20, 2019 08:41:52 PM GMT
+1
Comment by Ricardo R.
30578 | March 28, 2019 07:23:44 AM GMT
This is a huge issue and breaks thousands of CFHTTP calls for us.
Vote by Brian C.
30647 | April 22, 2019 02:37:05 PM GMT
This issue is not fixed as of 11,0,18,314030. Please re-open.
Comment by Alex P.
30657 | April 24, 2019 06:31:59 PM GMT
Previous commenter is correct, issue is still present in latest patch. Please re-open.
Comment by Brian C.
30691 | May 07, 2019 02:07:51 PM GMT