Project

Profile

Help

Bug #6664

closed

The include-content-type flag is ignored if the document has no head

Added by Norm Tovey-Walsh 7 days ago. Updated 7 days ago.

Status:
Won't fix
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2025-01-22
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

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.

Actions #2

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

Also available in: Atom PDF