Make WordPress Core


Ignore:
Timestamp:
01/19/2024 09:40:01 PM (15 months ago)
Author:
dmsnell
Message:

HTML API: Add support for BR, EMBED, & other tags.

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

  • AREA, BR, EMBED, KEYGEN, WBR
  • Only the opening BR tag is supported, as the invalid closer </br> involves more complicated rules, to be implemented later.

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 rules).

Props jonsurrell, dmsnell
Fixes #60283

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php

    r57314 r57316  
    163163        $unsupported_elements = array(
    164164            'APPLET', // Deprecated.
    165             'AREA',
    166165            'BASE',
    167166            'BGSOUND', // Deprecated; self-closing if self-closing flag provided, otherwise normal.
    168167            'BODY',
    169             'BR',
    170168            'CAPTION',
    171169            'COL',
    172170            'COLGROUP',
    173             'EMBED',
    174171            'FORM',
    175172            'FRAME',
     
    179176            'IFRAME',
    180177            'INPUT',
    181             'KEYGEN', // Deprecated; void.
    182178            'LINK',
    183179            'LISTING', // Deprecated, use PRE instead.
     
    214210            'TR',
    215211            'TRACK',
    216             'WBR',
    217212            'XMP', // Deprecated, use PRE instead.
    218213        );
Note: See TracChangeset for help on using the changeset viewer.