Closed
Bug 107904
Opened 23 years ago
Closed 20 years ago
Problems with XHTML as text/html in HTML tokenizer
Categories
(Core :: DOM: HTML Parser, defect, P3)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
WONTFIX
Future
People
(Reporter: choess, Assigned: harishd)
References
Details
From conversation with harishd on IRC tonight, CParserContext::SetMimeType() isn't setting the XML parsing flag for XHTML served as text/html, which it will eventually need to parse XML-style empty tags properly. Solution is probably to modify doctype-sniffing code upstream of tokenizer so that XHTML DTDs set both the strict and XML flags. (Actually, layout is handling text/html XHTML as quirks right now, but that's another bug).
Reporter | ||
Comment 1•23 years ago
|
||
Looks like the most likely solution would be to hack nsParser.cpp around line 1105 so documents with an XHTML doctype are set to, say, aDocType = eXHTML. In "if (aDocType == eXML)", s/XML/XHTML/, and the tokenizer should work correctly. Parse Mode will still be set to strict; however, I'm not sure exactly how the parser decides to use HTML or XML tokenizer, so I don't know how this would affect that mechanism.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.8
Comment 3•22 years ago
|
||
Pardon my ignorance, but is this bug requesting that XHTML documents served as text/html be parsed as XML (as they would if they were served with an XML mime type)?
Reporter | ||
Comment 4•22 years ago
|
||
I should hope not! This is in reference to XML-style empty elements being incompatible with strict SGML parsing: see <URL:http://www.cs.tut.fi/~jkorpela/html/empty.html>.
[was 1.1alpha]
Target Milestone: mozilla1.1alpha → Future
Comment 6•21 years ago
|
||
According to the HTMLWG, XHTML sent as text/html must not be parsed any differently than HTML sent as text/html. So this would be WONTFIX, no? I wish we implemented the NET feature...
![]() |
||
Comment 7•20 years ago
|
||
I'm going to go out on a limb here and wontfix this.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•