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: To Fix//BugVerified

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

Created: 02/22/2019

Components: Functions, String

Versions: 11.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 11,0,16,313933 /

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 5

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