WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 9280
94149
DTD extension - trailing ]>
https://bugs.webkit.org/show_bug.cgi?id=94149
Summary
DTD extension - trailing ]>
fhp.mail
Reported
2012-08-15 14:28:31 PDT
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
Comment 1
2012-08-15 14:44:28 PDT
[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
Comment 2
2012-08-15 19:20:15 PDT
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
Comment 3
2012-08-17 09:12:49 PDT
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
Comment 4
2012-08-17 09:26:59 PDT
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
Comment 5
2012-08-17 10:04:07 PDT
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
Comment 6
2012-08-17 10:38:59 PDT
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
Comment 7
2012-08-17 14:33:01 PDT
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?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug