Closed
Bug 7074
Opened 26 years ago
Closed 26 years ago
The XML DTD should stop sending tokens to the content sink after processing the XML Error token
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
FIXED
M7
People
(Reporter: alecf, Assigned: nisheeth_mozilla)
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
I had some XML that looked like:
<html:select multiple="true">
<html:option>MLK</option>
<html:option>FMM</option>
</html:select>
note that the close tag is "</option> not "</html:option>" - this of course
caused a parse error in the XML but it confused the heck out of the select
widget and made it crash in two different places because we're dereferencing a
null pointer.
I've attached the patch for both crashes. I've put assertions in because I don't
believe this state should ever have been reached, but I can't get work done when
it's crashing.
Reporter | ||
Comment 1•26 years ago
|
||
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•26 years ago
|
||
I'm testing with the patch in my tree right now. Will post a checkin message
once I'm done.
This bug raises an interesting issue. The HTML element code makes the
assumption that the HTML parser is going to fix invalid markup. This assumption
is untrue for the case when the HTML element code gets called from the XML
content sink. There are undoubtedly other bugs lurking around that belong to
this class of "invalid HTML in XML" bugs.
One possible solution for this problem is that if an error occurs in XML, only
the error token is propagated to the XML content sink by the XML DTD. All other
tokens get ignored. This is essentially what IE 5.0 does: invalid XML documents
are not displayed at all, only the error message is displayed.
Ccing Rickg, Harish, Troy, and Vidur for comments.
Assignee | ||
Comment 4•26 years ago
|
||
The patch is checked in as of now. Thanks Alec.
Comment 7•26 years ago
|
||
Yup. HTML in XML should really follow the rules set by the XHTML DTDs.
Specifically, it's fine for us to gracefully fail if the HTML is invalid or not
well-formed.
Assignee | ||
Updated•26 years ago
|
Summary: crash when <html:select> elements not closed properly → The XML DTD should stop sending tokens to the content sink after processing the XML Error token
Assignee | ||
Comment 8•26 years ago
|
||
Changing the status of this bug to reflect that we do not crash any more.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Checked in code, yesterday, that would allow parser to respond to errors from
XML,PICS, etc.. So, when an XML error occurs only the error token is propagated
to the content sink and after which the parser stops parsing. This fix should
take care of the above "crashes" mentioned.
Marking the bug fixed.
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 10•26 years ago
|
||
Fixed in the June 14th Build.
You need to log in
before you can comment on or make changes to this bug.
Description
•