Make WordPress Core

Changeset 57264 for trunk/phpcs.xml.dist


Ignore:
Timestamp:
01/10/2024 02:03:57 PM (4 months ago)
Author:
dmsnell
Message:

HTML API: Add support for list elements.

Adds support for the following HTML elements to the HTML Processor:

  • LI, OL, UL.
  • DD, DL, DT.

Previously, these elements were not supported and the HTML Processor would bail when encountering them.
With this patch it will proceed to parse an HTML document when encountering those tags as long as other normal conditions don't cause it to bail (such as complicated format reconstruction).

Props audrasjb, jonsurrell, bernhard-reiter.
Fixes #60215.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcs.xml.dist

    r57017 r57264  
    251251    </rule>
    252252
     253    <!-- Exclude forbidding goto in the HTML Processor, which mimics algorithms that are written
     254         this way in the HTML specification, and these particular algorithms are complex and
     255         highly imperative. Avoiding the goto introduces a number of risks that could make it
     256         more difficult to maintain the relationship to the standard, lead to subtle differences
     257         in the parsing, and distance the code from its standard. -->
     258    <rule ref="Generic.PHP.DiscourageGoto.Found">
     259        <exclude-pattern>/wp-includes/html-api/class-wp-html-processor\.php</exclude-pattern>
     260    </rule>
     261
    253262    <!-- Exclude sample config from modernization to prevent breaking CI workflows based on WP-CLI scaffold.
    254263         See: https://core.trac.wordpress.org/ticket/48082#comment:16 -->
Note: See TracChangeset for help on using the changeset viewer.