[Webkit-unassigned] [Bug 14945] New: 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
Sat Aug 11 22:51:48 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=14945
Summary: An ampersand ("&") appearing in a document is treated as
a fatal error (instead of a non-fatal error)
Product: WebKit
Version: 522+ (nightly)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: robburns1 at mac.com
XML lists the following fatal errors (http://www.w3.org/TR/xml/#dt-fatal):
Well-fromedness constraint violation
(http://www.w3.org/TR/xml/#dt-wellformed)
Encoding declaration errors (http://www.w3.org/TR/xml/#dt-fatal)
- entity in the wrong encoding
- an encoding declaration not at the beginning of an entity
- whenever the encoding cannot be processed
And under forbidden (http://www.w3.org/TR/xml/#forbidden):
- appearance of a reference to an unparsed entity, except in the
EntityValue in an entity declaration.
- the appearance of any character or general-entity reference in the DTD
except within an EntityValue or AttValue.
- a reference to an external entity in an attribute value.
There is no mention, in the list of fatal errors, of character entity
references (general entity references), except in an XML DTD. So even errant
general entities are not part of the fatal error definition. No other errors
are fatal and therefore: "Conforming software may detect and report an error
and may recover from it" (http://www.w3.org/TR/xml/#dt-error).
On the other hand the recommendation says:
"The ampersand character (&) and the left angle bracket (<) must not appear in
their literal form, except when used as markup delimiters, or within a comment,
a processing instruction, or a CDATA section"
(http://www.w3.org/TR/xml/#dt-chardata)
However, this is not a fatal error. Again, the recommendation says: "Conforming
software may detect and report an error and may recover from it" This means
that WebKit may report the stray ampersand, but it does not have to. Since it
can recover from the error it should.
These sorts of bugs give XML the reputation for having more draconian error
handling than it actually has. I may file a separate bug on the issue of
general entities
--
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