[wp-trac] [WordPress Trac] #62396: HTML API: serialize should include doctype when present
WordPress Trac
noreply at wordpress.org
Wed Nov 13 12:19:04 UTC 2024
#62396: HTML API: serialize should include doctype when present
--------------------------------------+-------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.7.1
Component: HTML API | Version: 6.7
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-------------------------
Changes (by Bernhard Reiter):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"59399" 59399]:
{{{
#!CommitTicketReference repository="" revision="59399"
HTML API: Include doctype in full parser serialize.
Output DOCTYPE when calling `WP_HTML_Processor::serialize` on a full
document that includes a DOCTYPE.
The DOCTYPE should be included in the serialized/normalized HTML output as
it has an impact in how the document is handled, in particular whether the
document should be handled in quirks or no-quirks mode.
This only affects the serialization of full parsers at this time because
DOCTYPE tokens are currently ignored in all possible fragments. The
omission of the DOCTYPE is subtle but can change the serialized document's
quirks/no-quirks mode.
Props jonsurrell.
Fixes #62396.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62396#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list