Bug #6664
closedThe include-content-type flag is ignored if the document has no head
0%
Description
I haven't tried to read through the serialization spec with great care, I'm just recording the observation. If you serialize <html><body><p>test</p></body></html>
as HTML with the include-content-type
property set to yes
, no content type is output.
Updated by Michael Kay 7 days ago
Well, the spec says
If there is a head element, and the include-content-type parameter has the value true, the HTML output method must add a meta element as the first child element of the head element specifying the character encoding actually used.
I guess we could argue that in HTML5 there is always a head element even if it isn't explicit in the markup; but that would seem a rather artificial reading.
Updated by Norm Tovey-Walsh 7 days ago
- Status changed from New to Won't fix
Fair enough. And it's probably an uncommon document that has no head.
Please register to edit this issue