[Webkit-unassigned] [Bug 14945] An ampersand ("&") appearing in a document is treated as a fatal error (instead of a non-fatal error)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 14 18:13:52 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14945


mjs at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID




------- Comment #8 from mjs at apple.com  2007-08-14 18:13 PDT -------
Section 2.1 gives this definition:

[Definition: A textual object is a well-formed XML document if:]

* Taken as a whole, it matches the production labeled document.
* It meets all the well-formedness constraints given in this specification.
* Each of the parsed entities which is referenced directly or indirectly within
the document is well-formed.

I believe the production you pasted does not match the production labelled
document. I say this because the problem is in an attribute, where the AttValue
production would apply:

[9]     EntityValue        ::=          '"' ([^%&"] | PEReference | Reference)*
'"'
|  "'" ([^%&'] | PEReference | Reference)* "'"
[10]    AttValue           ::=          '"' ([^<&"] | Reference)* '"'
|  "'" ([^<&'] | Reference)* "'"

Note that & is not allowed in an attribute value except in a Reference. The
production for Reference is:

[67]           Reference           ::=           EntityRef | CharRef
[68]    EntityRef          ::=          '&' Name ';'
[66]    CharRef    ::=          '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'

A Reference can be an EntityRef or a CharRef. Either way, it must start with &
and end with ;, and cannot contain an & in the middle. Thus, the attribute
value here:

href='http://www.nytimes.com/2007/08/12/books/review/Hitchens-t.html?_r=2&adxnnl=1&ampladxnnlx=1186840914-OUgjhcnZejswml3KgknPNg&pagewanted=all'

Does not match the AttrValue production, and as a result the document as a
whole does not match the document production, and thus it is not well-formed.
Resolving as INVALID.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list