tracker issue : CF-4203096

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

Canonicalize: &ne becomes ? unexpectedly

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/DesignLimitation

Reporter/Name(from Bugbase): Helen Kupeli / ()

Created: 07/19/2018

Components: Functions

Versions: 2016,11.0,2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016.0.06.308055 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 1

Problem Description:I'm using canonicalize as one step in checking URL's before validating each URL variable.  For some reason &ne seems to always translate as ? even in situations where that is not expected nor appropriate.

Steps to Reproduce:
<cfset varURL = "www.mySite.com/myPage.cfm?someVar=abc&newVar=1" />
<cfset varCheck = Canonicalize(varURL,true,true)/>
Now look at the value of varCheck.

Actual Result: The value of varCheck will be "www.mySite.com/myPage.cfm?someVar=abc?wVar=1"

Expected Result:"www.mySite.com/myPage.cfm?someVar=abc&newVar=1" since each variable is valid.

Any Workarounds: switch the order of the variables so newVar is first.  That only will work if you only have one variable that starts with "ne".

Attachments:

Comments:

The canonicalize function checks for multiple and mixed encodings (html, url and javascript) given any string. &ne is a valid html entity there by it replaced it with the equivalent html character. The function treats the given url as string it there by canonicalizes the string.
Comment by S V.
30040 | November 06, 2018 01:09:08 PM GMT