tracker issue : CF-3424179

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

JSStringFormat incorrectly handles single quotes

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Steve Sommers / Steve Sommers (Steve Sommers)

Created: 12/10/2012

Components: Language, Functions

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Problem Description: JSStringFormat incorrectly handles single quotes. 

Steps to Reproduce: Simply use the function to send data to a client using AJAX (I use the latest version of jquery).

Actual Result: A string containing single quotes will have the quotes escaped and this causes issues on many browsers (maybe all): "this is a \'string\'"

Expected Result: Single quotes should not be escaped: "this is a 'string'"

Any Workarounds: I currently have to do the following every time I use JSStringFormat: replace(jsStringFormat(variables.someString),"\'","'","ALL)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3424179

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Steve Sommers
External Customer Email:  
External Test Config: My Hardware and Environment details: IIS 7, CF 9.0.1, Windows 7 Workstation (and Windows 8 Server in production environment). This issue is not hardware/environment related.

Attachments:

Comments:

I've read the info on w3c and confirmed that single quotes should not be escaped. URLEncodedFormat has similar issues in that it over-encodes but I have not seen any side effects of over-encodeing -- other than using a little more data space because of the excess encoding.
Comment by External U.
16990 | December 10, 2012 11:50:04 AM GMT
Steve, It would be good if you can add a test case. The current behavior is there for sometime and any change might break something somewhere. So proper study will help us to go ahead and fix the issue.
Comment by Awdhesh K.
16991 | December 18, 2013 07:04:34 AM GMT
As there is no response from customer, and its close it a year now that this bug is waiting for info from customer. Closing this bug as Cannot reproduce.
Comment by HariKrishna K.
16992 | December 03, 2014 12:17:23 AM GMT