[wp-trac] [WordPress Trac] #62396: HTML API: serialize should include doctype when present

WordPress Trac noreply at wordpress.org
Wed Nov 13 16:14:08 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 dev-        |     Focuses:
  feedback fixed-major                           |
-------------------------------------------------+-------------------------
Changes (by cbravobernal):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59401" 59401]:
 {{{
 #!CommitTicketReference repository="" revision="59401"
 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.

 Reviewed by cbravobernal.
 Merges [59399] to the 6.7 branch.

 Props jonsurrell.
 Fixes #62396.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62396#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list