mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 352223 - < foo/> and < foo></foo> are also invalid XML and should be rejected by E4X. r=brendan again
This commit is contained in:
parent
d203816723
commit
75ce576332
@ -4868,7 +4868,6 @@ XMLElementOrList(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,
|
||||
JSBool allowList)
|
||||
{
|
||||
JSParseNode *pn, *pn2, *list;
|
||||
JSBool hadSpace;
|
||||
JSTokenType tt;
|
||||
JSAtom *startAtom, *endAtom;
|
||||
|
||||
@ -4878,7 +4877,6 @@ XMLElementOrList(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,
|
||||
return NULL;
|
||||
|
||||
ts->flags |= TSF_XMLTAGMODE;
|
||||
hadSpace = js_MatchToken(cx, ts, TOK_XMLSPACE);
|
||||
tt = js_GetToken(cx, ts);
|
||||
if (tt == TOK_ERROR)
|
||||
return NULL;
|
||||
@ -4990,7 +4988,7 @@ XMLElementOrList(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,
|
||||
|
||||
/* Set pn_op now that pn has been updated to its final value. */
|
||||
pn->pn_op = JSOP_TOXML;
|
||||
} else if (!hadSpace && allowList && tt == TOK_XMLTAGC) {
|
||||
} else if (allowList && tt == TOK_XMLTAGC) {
|
||||
/* XMLList Initialiser. */
|
||||
pn->pn_type = TOK_XMLLIST;
|
||||
pn->pn_op = JSOP_TOXMLLIST;
|
||||
|
Loading…
Reference in New Issue
Block a user