Bug 94149
Summary: | DTD extension - trailing ]> | ||
---|---|---|---|
Product: | WebKit | Reporter: | fhp.mail |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ap |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows 7 |
fhp.mail
Using a combination of a W3C DTD such as XHTML1.1 and some extra XML parsing rules:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
<!ENTITY % Misc.extra "| tree" >
]>
Results in a trailing ]> at the beginning of the page, although the pages validates correctly and allows <tree> tags as valid markup.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
fhp.mail
[Can't figure out how to add, so sorry for that in advance]
Actually, the issue applies to literally any inline DTD.
This, for example, is a rehashing of XHTML1.1 with an entity:
<!DOCTYPE html [
<!ENTITY % xhtml11.dtd
PUBLIC "-//W3C//XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
%xhtml11.dtd;
]>
Alexey Proskuryakov
This is correct behavior, please see original bug for discussion. You are serving the document as HTML, so XML parsing rules do not apply to it.
*** This bug has been marked as a duplicate of bug 9280 ***
fhp.mail
I am serving the document as XHTML, thus I should be able to include an XML-style DTD in either inline or referenced format.
Alexey Proskuryakov
Please provide an URL for the document for testing.
Unless Content-Type is one of XHTML ones as described in <http://www.w3.org/TR/xhtml-media-types/>, the document is parsed as HTML.
fhp.mail
I'm trying to develop a "portable" application, so I cannot use server-side changing of HTTP headers - and I'm currently unaware of a way to do it in plain HTML.
I was of the impression that an XML declaration (and I'm using the xmlns <html> attribute, just in case) should suffice for a document to be interpreted as xhtml.
Alexey Proskuryakov
That is incorrect. Browsers look at Content-Type HTTP header field to determine whether a document is HTML or XML, never at content.
fhp.mail
In that case, I'll just have to go with .xht(ml) since it seems it renders properly that way. Too bad it's registered by older operating systems.
One would think that XHTML is something to wish for in HTML, but alas, it seems not. I fail to see what backward compatibility problems allowing nested <> in the context of DTDs would cause, but I guess I'll just have to wait for a few years.
But really, XML declaration and DTD and a plain .html is not considered XHTML? Really?