Make WordPress Core


Ignore:
Timestamp:
01/10/2024 02:03:57 PM (5 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/wpHtmlProcessor.php

    r57248 r57264  
    169169            'COL'       => array( 'COL' ),
    170170            'COLGROUP'  => array( 'COLGROUP' ),
    171             'DD'        => array( 'DD' ),
    172             'DT'        => array( 'DT' ),
    173171            'EMBED'     => array( 'EMBED' ),
    174172            'FORM'      => array( 'FORM' ),
     
    181179            'INPUT'     => array( 'INPUT' ),
    182180            'KEYGEN'    => array( 'KEYGEN' ),
    183             'LI'        => array( 'LI' ),
    184181            'LINK'      => array( 'LINK' ),
    185182            'LISTING'   => array( 'LISTING' ),
     
    192189            'NOSCRIPT'  => array( 'NOSCRIPT' ),
    193190            'OBJECT'    => array( 'OBJECT' ),
    194             'OL'        => array( 'OL' ),
    195191            'OPTGROUP'  => array( 'OPTGROUP' ),
    196192            'OPTION'    => array( 'OPTION' ),
     
    219215            'TR'        => array( 'TR' ),
    220216            'TRACK'     => array( 'TRACK' ),
    221             'UL'        => array( 'UL' ),
    222217            'WBR'       => array( 'WBR' ),
    223218            'XMP'       => array( 'XMP' ),
Note: See TracChangeset for help on using the changeset viewer.