Closed Bug 320008 Opened 19 years ago Closed 19 years ago

e4x - quote escaped wrongly, works as expected in rhino.

Categories

(Core :: JavaScript Engine, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED FIXED
mozilla1.9alpha1

People

(Reporter: simon.place, Assigned: mrbkap)

Details

(Keywords: verified1.8.0.1, verified1.8.1)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: xpcshell; built on Nov 26 2005 at 11:41:16

see test code

Reproducible: Always

Steps to Reproduce:
1.  print (new XML("<hello a='\"' />").toXMLString());
2.
3.

Actual Results:  
<hello a="&amp;quot;"/>


Expected Results:  
<hello a="&quot;"/>


works as expected in rhino
I see this. Are we escaping twice?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → mozilla1.9alpha
Attached patch Yes, we areSplinter Review
In the case that we're in one of the XML constructors, we're not going to reparse the XML before escaping it again, so we shouldn't escape it here.
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #206129 - Flags: review?(brendan)
Comment on attachment 206129 [details] [diff] [review]
Yes, we are

r=me, thanks.

1.8.0 fodder?  Certainly 1.8 (we may end up just releasing a SpiderMonkey 1.7 to the 1.8 branch -- dig the numerology!).

/be
Attachment #206129 - Flags: review?(brendan) → review+
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Checking in 13.4.2.js;
/cvsroot/mozilla/js/tests/e4x/XML/13.4.2.js,v  <--  13.4.2.js
new revision: 1.4; previous revision: 1.3
Flags: testcase+
v windows/linux/mac
Status: RESOLVED → VERIFIED
Comment on attachment 206129 [details] [diff] [review]
Yes, we are

Another well-baked E4X fix for a bug without a workaround.  Safe as anything, and since E4X is new I'd like to get this in sooner, so that E4X adopters have a fix from 1.5.0.1 onward.

/be
Attachment #206129 - Flags: approval1.8.1?
Attachment #206129 - Flags: approval1.8.0.1?
Comment on attachment 206129 [details] [diff] [review]
Yes, we are

a=dveditz
Attachment #206129 - Flags: approval1.8.1?
Attachment #206129 - Flags: approval1.8.1+
Attachment #206129 - Flags: approval1.8.0.1?
Attachment #206129 - Flags: approval1.8.0.1+
Flags: blocking1.8.1+
Flags: blocking1.8.0.1+
fixed on both branches according to bonsai:

2006-01-10 21:07	brendan%mozilla.org 	mozilla/ js/ src/ jsscan.c 	3.81.2.7.2.4 	MOZILLA_1_8_0_BRANCH  	1/1  	Fix for 320008, a=dveditz.

2006-01-10 21:07	brendan%mozilla.org 	mozilla/ js/ src/ jsscan.c 	3.81.2.11 	MOZILLA_1_8_BRANCH  	1/1  	Fix for 320008, a=dveditz.
v.fixed on 1.8.0.1 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1.  Test code in comment #0 shows the correct results when run in JS console with:
alert(new XML("<hello a='\"' />").toXMLString());
v 2006-01-11 1.8.0.1, 1.8.1, trunk windows/linux/mac
Summary: quote escaped wrongly, works as expected in rhino. → e4x - quote escaped wrongly, works as expected in rhino.
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: