Make WordPress Core


Ignore:
Timestamp:
01/10/2024 02:03:57 PM (17 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/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php

    r57248 r57264  
    121121         */
    122122        $this->ensure_support_is_added_everywhere( 'SVG' );
    123 
    124         // These elements are specific to list item scope.
    125         $this->ensure_support_is_added_everywhere( 'OL' );
    126         $this->ensure_support_is_added_everywhere( 'UL' );
    127 
    128         // This element is the only element that depends on list item scope.
    129         $this->ensure_support_is_added_everywhere( 'LI' );
    130123    }
    131124
Note: See TracChangeset for help on using the changeset viewer.