Make WordPress Core

Changeset 58925 for trunk/phpcs.xml.dist


Ignore:
Timestamp:
08/23/2024 02:53:59 PM (6 months ago)
Author:
dmsnell
Message:

HTML API: Parse DOCTYPE tokens and set HTML parser mode accordingly.

This patch adds until-now missing code to parse the structure of HTML DOCTYPE declarations. The DOCTYPE is mostly unused but can dictate the document compatability mode, which governs whether CSS class names match in a ASCII-case-insensitive way or not, and whether TABLE elements close an open P element.

The DOCTYPE information is made available through a new method on the Tag Processor, get_doctype_info().

Developed in https://github.com/wordpress/wordpress-develop/pull/7195
Discussed in https://core.trac.wordpress.org/ticket/61576

Props dmsnell, jonsurrell.
See #61576.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcs.xml.dist

    r58107 r58925  
    263263    <rule ref="Generic.PHP.DiscourageGoto.Found">
    264264        <exclude-pattern>/wp-includes/html-api/class-wp-html-processor\.php</exclude-pattern>
     265        <exclude-pattern>/wp-includes/html-api/class-wp-html-doctype-info\.php</exclude-pattern>
    265266    </rule>
    266267
Note: See TracChangeset for help on using the changeset viewer.