HTML API: Add support for PRE and LISTING elements.

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

 - PRE, LISTING

Previously, these elements were not supported and the HTML Processor would bail when encountering them. Now, with this patch applied, it will proceed to parse an HTML document when encountering those tags.

Developed in WordPress/wordpress-develop#5903

Props jonsurrell, dmsnell
Fixes #60283



git-svn-id: https://develop.svn.wordpress.org/trunk@57317 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dennis Snell
2024-01-19 22:05:37 +00:00
parent 91e51f92a8
commit 85de4aa70d
3 changed files with 16 additions and 8 deletions
@@ -254,7 +254,6 @@ class Tests_HtmlApi_WpHtmlProcessor extends WP_UnitTestCase {
'IFRAME' => array( 'IFRAME' ),
'INPUT' => array( 'INPUT' ),
'LINK' => array( 'LINK' ),
'LISTING' => array( 'LISTING' ),
'MARQUEE' => array( 'MARQUEE' ),
'MATH' => array( 'MATH' ),
'META' => array( 'META' ),
@@ -267,7 +266,6 @@ class Tests_HtmlApi_WpHtmlProcessor extends WP_UnitTestCase {
'OPTION' => array( 'OPTION' ),
'PARAM' => array( 'PARAM' ),
'PLAINTEXT' => array( 'PLAINTEXT' ),
'PRE' => array( 'PRE' ),
'RB' => array( 'RB' ),
'RP' => array( 'RP' ),
'RT' => array( 'RT' ),
@@ -176,7 +176,6 @@ class Tests_HtmlApi_WpHtmlProcessorBreadcrumbs extends WP_UnitTestCase {
'IFRAME',
'INPUT',
'LINK',
'LISTING', // Deprecated, use PRE instead.
'MARQUEE', // Deprecated.
'MATH',
'META',
@@ -188,7 +187,6 @@ class Tests_HtmlApi_WpHtmlProcessorBreadcrumbs extends WP_UnitTestCase {
'OPTGROUP',
'OPTION',
'PLAINTEXT', // Neutralized.
'PRE',
'RB', // Neutralized.
'RP',
'RT',