Closed Bug 289634 Opened 19 years ago Closed 19 years ago

e4x 11.1.4 - XML Initializer

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: bc, Unassigned)

References

()

Details

Current trunk builds fail 

Testcase e4x/Expressions/11.1.4.js failed
[ Top of Page ]
STATUS: 11.1.4 - XML Initializer
Failure messages were:
FAILED!: Section 19 of test -
FAILED!: Expected value:
FAILED!: <x a="5 > 3 is true">5 > 3 is true</x>
FAILED!: Actual value:
FAILED!: <x a="5 > 3 is true">5 &gt; 3 is true</x>
FAILED!:


However from ECMA 357 10.2.1 the value of the element should be escaped and this
test is incorrect.

x = <{c} a={a + " > " + b + " is " + (a > b)}>{a + " > " + b + " is " + (a >
b)}</{c}>;
TEST(19, "<x a=\"5 > 3 is true\">5 > 3 is true</x>", x.toXMLString());

should be:

x = <{c} a={a + " > " + b + " is " + (a > b)}>{a + " > " + b + " is " + (a >
b)}</{c}>;
TEST(19, "<x a=\"5 > 3 is true\">5 &gt; 3 is true</x>", x.toXMLString());

Brendan, do you agree the bug is in the test case?
Yes, and so does ECMA TG1.  Just for "balance" we agreed to escape > as well as
< even though XML does not require it.

/be
Summary: e4x 11.1.4 - XML Initializer → e4x 11.1.4 - XML Initializer
Checking in 11.1.4.js;
/cvsroot/mozilla/js/tests/e4x/Expressions/11.1.4.js,v  <--  11.1.4.js
new revision: 1.4; previous revision: 1.3

Fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: testcase+
verified fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.