[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
Fri Aug 17 23:04:34 PDT 2007


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





------- Comment #13 from robburns1 at mac.com  2007-08-17 23:04 PDT -------
I'm leaving this resolved, but I don't think the issue has been adequately
explored. I wouldn't suggest a recommendation should include error-recovery
algorithms for this situation. However for an implementation, this is one of
those areas where going against the spec, may not have negative ramifications.
Recovering from an errant & character in an XML document does not have any tree
construction implications. Even if the reference to an external DTD included
more complex entities than simply a character (which is how this is used mostly
for references to characters), this would simply mean some portion of the
transcluded content was missing. None of the rest of the tree can be effect by
this. That's different than any well-formedness constraint violation (which
this is not), where the remainder of the tree is effected (hence the
requirement to treat it as a fatal error).

More importantly, this does nothing to break content for non-errant documents.
For authors who use proper syntax throughout the document, all of their
references will be properly recognized even if noon-fatal-error handling is
instituted for stray & characters.

I may be missing some serious consequences here, but I fail to see how treating
stray & characters as non-fatal errros will break XML processing in general (or
at all). Clearly marking the error on the page (even in an offensively annoying
way like a big ugly bug icon) will provide the feedback necessary for authors
to recognize the error, yet still allow the user to view the contents of an
errant page.

It would be best to deal with this bug by brainstorming about how
non-fatal-error handling here would break anything. How would it be bad for
users of WebKit? The issue shouldn't be about how much we like draconian error
handling on a personal level. It also shouldn't be a slavish devotion to the
XML recommendation. Maybe WebKit doesn't want to be the first implementation to
break from a recommendation, and that doesn't sound like a bad principle to
follow. But it is worth discussing and making that explicit if that is indeed
the case.

The proposed Project Goals state:

"We value real-world web compatibility, standards compliance, stability,
performance, security, portability, usability and relative ease of
understanding and modifying the code "

The real-world also has errant & characters: even in XML. Though perhaps XML is
a sacred cow when it comes to compliance. My only concern would be that
treating errant & characters as non-fatal-errors would have unintended
consequences: in other words some effects to the document tree beyond the
isolated area around the & character.


-- 
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