<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[57248] trunk: HTML API: Add explicit handling or failure for all tags.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/57248">57248</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/57248","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>Bernhard Reiter</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-01-08 14:03:40 +0000 (Mon, 08 Jan 2024)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>HTML API: Add explicit handling or failure for all tags.

The HTML API HTML processor does not yet support all tags. Many tags (e.g. list elements) have some complicated rules in the [https://html.spec.whatwg.org/#parsing-main-inbody "in body" insertion mode].

Implementing these special rules is blocking the implementation for a catch-all rule for "any other tag" because we need to prevent special rules from being handled by the catch-all.

  Any other start tag
  Reconstruct the active formatting elements, if any.

  Insert an HTML element for the token.

  ...

This change ensures the HTML Processor fails when handling special tags. This is the same as existing behavior, but will allow us to implement the catch-all "any other tag" handling without unintentionally handling special elements.

Additionally, we add tests that assert the special elements are unhandled. As these tags are implemented, this should help to ensure they're removed from the unsupported tag list.

Props jonsurrell, dmsnell.
Fixes <a href="https://core.trac.wordpress.org/ticket/60092">#60092</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludeshtmlapiclasswphtmlprocessorphp">trunk/src/wp-includes/html-api/class-wp-html-processor.php</a></li>
<li><a href="#trunktestsphpunittestshtmlapiwpHtmlProcessorphp">trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php</a></li>
<li><a href="#trunktestsphpunittestshtmlapiwpHtmlProcessorBreadcrumbsphp">trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php</a></li>
<li><a href="#trunktestsphpunittestshtmlapiwpHtmlSupportRequiredOpenElementsphp">trunk/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludeshtmlapiclasswphtmlprocessorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/html-api/class-wp-html-processor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/html-api/class-wp-html-processor.php        2024-01-08 06:21:02 UTC (rev 57247)
+++ trunk/src/wp-includes/html-api/class-wp-html-processor.php  2024-01-08 14:03:40 UTC (rev 57248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,15 +100,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * The following list specifies the HTML tags that _are_ supported:
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  *  - Containers: ADDRESS, BLOCKQUOTE, DETAILS, DIALOG, DIV, FOOTER, HEADER, MAIN, MENU, SPAN, SUMMARY.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *  - Form elements: BUTTON, FIELDSET, SEARCH.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *  - Custom elements: All custom elements are supported. :)
+ *  - Form elements: BUTTON, DATALIST, FIELDSET, LABEL, LEGEND, METER, PROGRESS, SEARCH.
</ins><span class="cx" style="display: block; padding: 0 10px">  *  - Formatting elements: B, BIG, CODE, EM, FONT, I, SMALL, STRIKE, STRONG, TT, U.
</span><span class="cx" style="display: block; padding: 0 10px">  *  - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP.
</span><span class="cx" style="display: block; padding: 0 10px">  *  - Links: A.
</span><span class="cx" style="display: block; padding: 0 10px">  *  - Lists: DL.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *  - Media elements: FIGCAPTION, FIGURE, IMG.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *  - Media elements: AUDIO, CANVAS, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, VIDEO.
</ins><span class="cx" style="display: block; padding: 0 10px">  *  - Paragraph: P.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *  - Sectioning elements: ARTICLE, ASIDE, NAV, SECTION
- *  - Deprecated elements: CENTER, DIR
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *  - Phrasing elements: ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR.
+ *  - Sectioning elements: ARTICLE, ASIDE, NAV, SECTION.
+ *  - Templating elements: SLOT.
+ *  - Text decoration: RUBY.
+ *  - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, MULTICOL, NEXTID, SPACER.
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * ### Supported markup
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -830,41 +834,132 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->reconstruct_active_formatting_elements();
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->insert_html_element( $this->state->current_token );
</span><span class="cx" style="display: block; padding: 0 10px">                                return true;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /*
+                * These tags require special handling in the 'in body' insertion mode
+                * but that handling hasn't yet been implemented.
+                *
+                * As the rules for each tag are implemented, the corresponding tag
+                * name should be removed from this list. An accompanying test should
+                * help ensure this list is maintained.
+                *
+                * @see Tests_HtmlApi_WpHtmlProcessor::test_step_in_body_fails_on_unsupported_tags
+                *
+                * Since this switch structure throws a WP_HTML_Unsupported_Exception, it's
+                * possible to handle "any other start tag" and "any other end tag" below,
+                * as that guarantees execution doesn't proceed for the unimplemented tags.
+                *
+                * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody
+                */
+               switch ( $tag_name ) {
+                       case 'APPLET':
+                       case 'AREA':
+                       case 'BASE':
+                       case 'BASEFONT':
+                       case 'BGSOUND':
+                       case 'BODY':
+                       case 'BR':
+                       case 'CAPTION':
+                       case 'COL':
+                       case 'COLGROUP':
+                       case 'DD':
+                       case 'DT':
+                       case 'EMBED':
+                       case 'FORM':
+                       case 'FRAME':
+                       case 'FRAMESET':
+                       case 'HEAD':
+                       case 'HR':
+                       case 'HTML':
+                       case 'IFRAME':
+                       case 'INPUT':
+                       case 'KEYGEN':
+                       case 'LI':
+                       case 'LINK':
+                       case 'LISTING':
+                       case 'MARQUEE':
+                       case 'MATH':
+                       case 'META':
+                       case 'NOBR':
+                       case 'NOEMBED':
+                       case 'NOFRAMES':
+                       case 'NOSCRIPT':
+                       case 'OBJECT':
+                       case 'OL':
+                       case 'OPTGROUP':
+                       case 'OPTION':
+                       case 'PARAM':
+                       case 'PLAINTEXT':
+                       case 'PRE':
+                       case 'RB':
+                       case 'RP':
+                       case 'RT':
+                       case 'RTC':
+                       case 'SARCASM':
+                       case 'SCRIPT':
+                       case 'SELECT':
+                       case 'SOURCE':
+                       case 'STYLE':
+                       case 'SVG':
+                       case 'TABLE':
+                       case 'TBODY':
+                       case 'TD':
+                       case 'TEMPLATE':
+                       case 'TEXTAREA':
+                       case 'TFOOT':
+                       case 'TH':
+                       case 'THEAD':
+                       case 'TITLE':
+                       case 'TR':
+                       case 'TRACK':
+                       case 'UL':
+                       case 'WBR':
+                       case 'XMP':
+                               $this->last_error = self::ERROR_UNSUPPORTED;
+                               throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." );
+               }
+
+               if ( ! $this->is_tag_closer() ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         /*
</span><span class="cx" style="display: block; padding: 0 10px">                         * > Any other start tag
</span><span class="cx" style="display: block; padding: 0 10px">                         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        case '+SPAN':
-                               $this->reconstruct_active_formatting_elements();
-                               $this->insert_html_element( $this->state->current_token );
-                               return true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->reconstruct_active_formatting_elements();
+                       $this->insert_html_element( $this->state->current_token );
+                       return true;
+               } else {
+                       /*
+                        * > Any other end tag
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        /*
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                         * Any other end tag
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                  * Find the corresponding tag opener in the stack of open elements, if
+                        * it exists before reaching a special element, which provides a kind
+                        * of boundary in the stack. For example, a `</custom-tag>` should not
+                        * close anything beyond its containing `P` or `DIV` element.
</ins><span class="cx" style="display: block; padding: 0 10px">                          */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        case '-SPAN':
-                               foreach ( $this->state->stack_of_open_elements->walk_up() as $item ) {
-                                       // > If node is an HTML element with the same tag name as the token, then:
-                                       if ( $item->node_name === $tag_name ) {
-                                               $this->generate_implied_end_tags( $tag_name );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 foreach ( $this->state->stack_of_open_elements->walk_up() as $node ) {
+                               if ( $tag_name === $node->node_name ) {
+                                       break;
+                               }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                // > If node is not the current node, then this is a parse error.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( self::is_special( $node->node_name ) ) {
+                                       // This is a parse error, ignore the token.
+                                       return $this->step();
+                               }
+                       }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                $this->state->stack_of_open_elements->pop_until( $tag_name );
-                                               return true;
-                                       }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->generate_implied_end_tags( $tag_name );
+                       if ( $node !== $this->state->stack_of_open_elements->current_node() ) {
+                               // @todo Record parse error: this error doesn't impact parsing.
+                       }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        // > Otherwise, if node is in the special category, then this is a parse error; ignore the token, and return.
-                                       if ( self::is_special( $item->node_name ) ) {
-                                               return $this->step();
-                                       }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 foreach ( $this->state->stack_of_open_elements->walk_up() as $item ) {
+                               $this->state->stack_of_open_elements->pop();
+                               if ( $node === $item ) {
+                                       return true;
</ins><span class="cx" style="display: block; padding: 0 10px">                                 }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                // Execution should not reach here; if it does then something went wrong.
-                               return false;
-
-                       default:
-                               $this->last_error = self::ERROR_UNSUPPORTED;
-                               throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 }
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1264,7 +1359,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        // > If formatting element is not in the stack of open elements, then this is a parse error; remove the element from the list, and return.
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( ! $this->state->stack_of_open_elements->contains_node( $formatting_element ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $this->state->active_formatting_elements->remove_node( $formatting_element->bookmark_name );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $this->state->active_formatting_elements->remove_node( $formatting_element );
</ins><span class="cx" style="display: block; padding: 0 10px">                                 return;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestshtmlapiwpHtmlProcessorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php    2024-01-08 06:21:02 UTC (rev 57247)
+++ trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php      2024-01-08 14:03:40 UTC (rev 57248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,22 +61,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * Ensures that if the HTML Processor encounters inputs that it can't properly handle,
-        * that it stops processing the rest of the document. This prevents data corruption.
-        *
-        * @ticket 59167
-        *
-        * @covers WP_HTML_Processor::next_tag
-        */
-       public function test_stops_processing_after_unsupported_elements() {
-               $p = WP_HTML_Processor::create_fragment( '<p><x-not-supported></p><p></p>' );
-               $p->next_tag( 'P' );
-               $this->assertFalse( $p->next_tag(), 'Stepped into a tag after encountering X-NOT-SUPPORTED element when it should have aborted.' );
-               $this->assertNull( $p->get_tag(), "Should have aborted processing, but still reported tag {$p->get_tag()} after properly failing to step into tag." );
-               $this->assertFalse( $p->next_tag( 'P' ), 'Stepped into normal P element after X-NOT-SUPPORTED element when it should have aborted.' );
-       }
-
-       /**
</del><span class="cx" style="display: block; padding: 0 10px">          * Ensures that the HTML Processor maintains its internal state through seek calls.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * Because the HTML Processor must track a stack of open elements and active formatting
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -147,4 +131,96 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( $p->next_tag( 'EM' ), 'Could not find first EM.' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( $p->next_tag( 'EM' ), 'Should have aborted before finding second EM as it required reconstructing the first EM.' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+       /**
+        * Ensures that special handling of unsupported tags is cleaned up
+        * as handling is implemented. Otherwise there's risk of leaving special
+        * handling (that is never reached) when tag handling is implemented.
+        *
+        * @ticket 60092
+        *
+        * @dataProvider data_unsupported_special_in_body_tags
+        *
+        * @covers WP_HTML_Processor::step_in_body
+        *
+        * @param string $tag_name Name of the tag to test.
+        */
+       public function test_step_in_body_fails_on_unsupported_tags( $tag_name ) {
+               $fragment = WP_HTML_Processor::create_fragment( '<' . $tag_name . '></' . $tag_name . '>' );
+               $this->assertFalse( $fragment->next_tag(), 'Should fail to find tag: ' . $tag_name . '.' );
+               $this->assertEquals( $fragment->get_last_error(), WP_HTML_Processor::ERROR_UNSUPPORTED, 'Should have unsupported last error.' );
+       }
+
+       /**
+        * Data provider.
+        *
+        * @return array[]
+        */
+       public function data_unsupported_special_in_body_tags() {
+               return array(
+                       'APPLET'    => array( 'APPLET' ),
+                       'AREA'      => array( 'AREA' ),
+                       'BASE'      => array( 'BASE' ),
+                       'BASEFONT'  => array( 'BASEFONT' ),
+                       'BGSOUND'   => array( 'BGSOUND' ),
+                       'BODY'      => array( 'BODY' ),
+                       'BR'        => array( 'BR' ),
+                       'CAPTION'   => array( 'CAPTION' ),
+                       'COL'       => array( 'COL' ),
+                       'COLGROUP'  => array( 'COLGROUP' ),
+                       'DD'        => array( 'DD' ),
+                       'DT'        => array( 'DT' ),
+                       'EMBED'     => array( 'EMBED' ),
+                       'FORM'      => array( 'FORM' ),
+                       'FRAME'     => array( 'FRAME' ),
+                       'FRAMESET'  => array( 'FRAMESET' ),
+                       'HEAD'      => array( 'HEAD' ),
+                       'HR'        => array( 'HR' ),
+                       'HTML'      => array( 'HTML' ),
+                       'IFRAME'    => array( 'IFRAME' ),
+                       'INPUT'     => array( 'INPUT' ),
+                       'KEYGEN'    => array( 'KEYGEN' ),
+                       'LI'        => array( 'LI' ),
+                       'LINK'      => array( 'LINK' ),
+                       'LISTING'   => array( 'LISTING' ),
+                       'MARQUEE'   => array( 'MARQUEE' ),
+                       'MATH'      => array( 'MATH' ),
+                       'META'      => array( 'META' ),
+                       'NOBR'      => array( 'NOBR' ),
+                       'NOEMBED'   => array( 'NOEMBED' ),
+                       'NOFRAMES'  => array( 'NOFRAMES' ),
+                       'NOSCRIPT'  => array( 'NOSCRIPT' ),
+                       'OBJECT'    => array( 'OBJECT' ),
+                       'OL'        => array( 'OL' ),
+                       'OPTGROUP'  => array( 'OPTGROUP' ),
+                       'OPTION'    => array( 'OPTION' ),
+                       'PARAM'     => array( 'PARAM' ),
+                       'PLAINTEXT' => array( 'PLAINTEXT' ),
+                       'PRE'       => array( 'PRE' ),
+                       'RB'        => array( 'RB' ),
+                       'RP'        => array( 'RP' ),
+                       'RT'        => array( 'RT' ),
+                       'RTC'       => array( 'RTC' ),
+                       'SARCASM'   => array( 'SARCASM' ),
+                       'SCRIPT'    => array( 'SCRIPT' ),
+                       'SELECT'    => array( 'SELECT' ),
+                       'SOURCE'    => array( 'SOURCE' ),
+                       'STYLE'     => array( 'STYLE' ),
+                       'SVG'       => array( 'SVG' ),
+                       'TABLE'     => array( 'TABLE' ),
+                       'TBODY'     => array( 'TBODY' ),
+                       'TD'        => array( 'TD' ),
+                       'TEMPLATE'  => array( 'TEMPLATE' ),
+                       'TEXTAREA'  => array( 'TEXTAREA' ),
+                       'TFOOT'     => array( 'TFOOT' ),
+                       'TH'        => array( 'TH' ),
+                       'THEAD'     => array( 'THEAD' ),
+                       'TITLE'     => array( 'TITLE' ),
+                       'TR'        => array( 'TR' ),
+                       'TRACK'     => array( 'TRACK' ),
+                       'UL'        => array( 'UL' ),
+                       'WBR'       => array( 'WBR' ),
+                       'XMP'       => array( 'XMP' ),
+               );
+       }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestshtmlapiwpHtmlProcessorBreadcrumbsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php 2024-01-08 06:21:02 UTC (rev 57247)
+++ trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php   2024-01-08 14:03:40 UTC (rev 57248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,14 +37,26 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public function data_single_tag_of_supported_elements() {
</span><span class="cx" style="display: block; padding: 0 10px">                $supported_elements = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'A',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'ABBR',
+                       'ACRONYM', // Neutralized
</ins><span class="cx" style="display: block; padding: 0 10px">                         'ADDRESS',
</span><span class="cx" style="display: block; padding: 0 10px">                        'ARTICLE',
</span><span class="cx" style="display: block; padding: 0 10px">                        'ASIDE',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'AUDIO',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'B',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'BDI',
+                       'BDO',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'BIG',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'BLINK', // Deprecated
</ins><span class="cx" style="display: block; padding: 0 10px">                         'BUTTON',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'CANVAS',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'CENTER', // Neutralized
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'CITE',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'CODE',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'DATA',
+                       'DATALIST',
+                       'DFN',
+                       'DEL',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'DETAILS',
</span><span class="cx" style="display: block; padding: 0 10px">                        'DIALOG',
</span><span class="cx" style="display: block; padding: 0 10px">                        'DIR',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -66,19 +78,42 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'HGROUP',
</span><span class="cx" style="display: block; padding: 0 10px">                        'I',
</span><span class="cx" style="display: block; padding: 0 10px">                        'IMG',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'INS',
+                       'ISINDEX', // Deprecated
+                       'KBD',
+                       'LABEL',
+                       'LEGEND',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'MAIN',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'MAP',
+                       'MARK',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'MENU',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'METER',
+                       'MULTICOL', // Deprecated
</ins><span class="cx" style="display: block; padding: 0 10px">                         'NAV',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'NEXTID', // Deprecated
+                       'OUTPUT',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'P',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'PICTURE',
+                       'PROGRESS',
+                       'Q',
+                       'RUBY',
+                       'SAMP',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'SEARCH',
</span><span class="cx" style="display: block; padding: 0 10px">                        'SECTION',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'SLOT',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'SMALL',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'SPACER', // Deprecated
</ins><span class="cx" style="display: block; padding: 0 10px">                         'SPAN',
</span><span class="cx" style="display: block; padding: 0 10px">                        'STRIKE',
</span><span class="cx" style="display: block; padding: 0 10px">                        'STRONG',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'SUB',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'SUMMARY',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'SUP',
+                       'TIME',
</ins><span class="cx" style="display: block; padding: 0 10px">                         'TT',
</span><span class="cx" style="display: block; padding: 0 10px">                        'U',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'VAR',
+                       'VIDEO',
</ins><span class="cx" style="display: block; padding: 0 10px">                 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $data = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,28 +156,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function data_unsupported_elements() {
</span><span class="cx" style="display: block; padding: 0 10px">                $unsupported_elements = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'ABBR',
-                       'ACRONYM', // Neutralized
</del><span class="cx" style="display: block; padding: 0 10px">                         'APPLET', // Deprecated
</span><span class="cx" style="display: block; padding: 0 10px">                        'AREA',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'AUDIO',
</del><span class="cx" style="display: block; padding: 0 10px">                         'BASE',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'BDI',
-                       'BDO',
</del><span class="cx" style="display: block; padding: 0 10px">                         'BGSOUND', // Deprecated; self-closing if self-closing flag provided, otherwise normal.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'BLINK', // Deprecated
</del><span class="cx" style="display: block; padding: 0 10px">                         'BODY',
</span><span class="cx" style="display: block; padding: 0 10px">                        'BR',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'CANVAS',
</del><span class="cx" style="display: block; padding: 0 10px">                         'CAPTION',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'CITE',
</del><span class="cx" style="display: block; padding: 0 10px">                         'COL',
</span><span class="cx" style="display: block; padding: 0 10px">                        'COLGROUP',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'DATA',
-                       'DATALIST',
</del><span class="cx" style="display: block; padding: 0 10px">                         'DD',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'DEL',
-                       'DEFN',
</del><span class="cx" style="display: block; padding: 0 10px">                         'DT',
</span><span class="cx" style="display: block; padding: 0 10px">                        'EMBED',
</span><span class="cx" style="display: block; padding: 0 10px">                        'FORM',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -153,23 +176,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'HTML',
</span><span class="cx" style="display: block; padding: 0 10px">                        'IFRAME',
</span><span class="cx" style="display: block; padding: 0 10px">                        'INPUT',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'INS',
-                       'ISINDEX', // Deprecated
-                       'KBD',
</del><span class="cx" style="display: block; padding: 0 10px">                         'KEYGEN', // Deprecated; void
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'LABEL',
-                       'LEGEND',
</del><span class="cx" style="display: block; padding: 0 10px">                         'LI',
</span><span class="cx" style="display: block; padding: 0 10px">                        'LINK',
</span><span class="cx" style="display: block; padding: 0 10px">                        'LISTING', // Deprecated, use PRE instead.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'MAP',
-                       'MARK',
</del><span class="cx" style="display: block; padding: 0 10px">                         'MARQUEE', // Deprecated
</span><span class="cx" style="display: block; padding: 0 10px">                        'MATH',
</span><span class="cx" style="display: block; padding: 0 10px">                        'META',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'METER',
-                       'MULTICOL', // Deprecated
-                       'NEXTID', // Deprecated
</del><span class="cx" style="display: block; padding: 0 10px">                         'NOBR', // Neutralized
</span><span class="cx" style="display: block; padding: 0 10px">                        'NOEMBED', // Neutralized
</span><span class="cx" style="display: block; padding: 0 10px">                        'NOFRAMES', // Neutralized
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -178,26 +191,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'OL',
</span><span class="cx" style="display: block; padding: 0 10px">                        'OPTGROUP',
</span><span class="cx" style="display: block; padding: 0 10px">                        'OPTION',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'OUTPUT',
-                       'PICTURE',
</del><span class="cx" style="display: block; padding: 0 10px">                         'PLAINTEXT', // Neutralized
</span><span class="cx" style="display: block; padding: 0 10px">                        'PRE',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'PROGRESS',
-                       'Q',
</del><span class="cx" style="display: block; padding: 0 10px">                         'RB', // Neutralized
</span><span class="cx" style="display: block; padding: 0 10px">                        'RP',
</span><span class="cx" style="display: block; padding: 0 10px">                        'RT',
</span><span class="cx" style="display: block; padding: 0 10px">                        'RTC', // Neutralized
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'RUBY',
-                       'SAMP',
</del><span class="cx" style="display: block; padding: 0 10px">                         'SCRIPT',
</span><span class="cx" style="display: block; padding: 0 10px">                        'SELECT',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'SLOT',
</del><span class="cx" style="display: block; padding: 0 10px">                         'SOURCE',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'SPACER', // Deprecated
</del><span class="cx" style="display: block; padding: 0 10px">                         'STYLE',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'SUB',
-                       'SUP',
</del><span class="cx" style="display: block; padding: 0 10px">                         'SVG',
</span><span class="cx" style="display: block; padding: 0 10px">                        'TABLE',
</span><span class="cx" style="display: block; padding: 0 10px">                        'TBODY',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -207,19 +210,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'TFOOT',
</span><span class="cx" style="display: block; padding: 0 10px">                        'TH',
</span><span class="cx" style="display: block; padding: 0 10px">                        'THEAD',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'TIME',
</del><span class="cx" style="display: block; padding: 0 10px">                         'TITLE',
</span><span class="cx" style="display: block; padding: 0 10px">                        'TR',
</span><span class="cx" style="display: block; padding: 0 10px">                        'TRACK',
</span><span class="cx" style="display: block; padding: 0 10px">                        'UL',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'VAR',
-                       'VIDEO',
</del><span class="cx" style="display: block; padding: 0 10px">                         'WBR',
</span><span class="cx" style="display: block; padding: 0 10px">                        'XMP', // Deprecated, use PRE instead.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                       // Made up elements, custom elements.
-                       'X-NOT-AN-HTML-ELEMENT',
-                       'HUMAN-TIME',
</del><span class="cx" style="display: block; padding: 0 10px">                 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $data = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -360,6 +356,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'H4 inside H2'                          => array( '<h2><span>Major<h4 target>Minor</h3></span>', array( 'HTML', 'BODY', 'H2', 'SPAN', 'H4' ), 1 ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'H5 after unclosed H4 inside H2'        => array( '<h2><span>Major<h4>Minor</span></h3><h5 target>', array( 'HTML', 'BODY', 'H2', 'SPAN', 'H5' ), 1 ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'H5 after H4 inside H2'                 => array( '<h2><span>Major<h4>Minor</h4></span></h3><h5 target>', array( 'HTML', 'BODY', 'H5' ), 1 ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                       // Custom elements.
+                       'WP-EMOJI'                              => array( '<div><wp-emoji target></wp-emoji></div>', array( 'HTML', 'BODY', 'DIV', 'WP-EMOJI' ), 1 ),
+                       'WP-EMOJI then IMG'                     => array( '<div><wp-emoji></wp-emoji><img target></div>', array( 'HTML', 'BODY', 'DIV', 'IMG' ), 1 ),
</ins><span class="cx" style="display: block; padding: 0 10px">                 );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestshtmlapiwpHtmlSupportRequiredOpenElementsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php  2024-01-08 06:21:02 UTC (rev 57247)
+++ trunk/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php    2024-01-08 14:03:40 UTC (rev 57248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -72,21 +72,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OBJECT' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'TEMPLATE' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // MathML Elements
-               $this->ensure_support_is_added_everywhere( 'MI' );
-               $this->ensure_support_is_added_everywhere( 'MO' );
-               $this->ensure_support_is_added_everywhere( 'MN' );
-               $this->ensure_support_is_added_everywhere( 'MS' );
-               $this->ensure_support_is_added_everywhere( 'MTEXT' );
-               $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
+               $this->ensure_support_is_added_everywhere( 'MATH' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * SVG elements: note that TITLE is both an HTML element and an SVG element
</span><span class="cx" style="display: block; padding: 0 10px">                 * so care must be taken when adding support for either one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 *
+                * FOREIGNOBJECT, DESC, TITLE.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' );
-               $this->ensure_support_is_added_everywhere( 'DESC' );
-               $this->ensure_support_is_added_everywhere( 'TITLE' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->ensure_support_is_added_everywhere( 'SVG' );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -115,21 +110,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OBJECT' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'TEMPLATE' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // MathML Elements
-               $this->ensure_support_is_added_everywhere( 'MI' );
-               $this->ensure_support_is_added_everywhere( 'MO' );
-               $this->ensure_support_is_added_everywhere( 'MN' );
-               $this->ensure_support_is_added_everywhere( 'MS' );
-               $this->ensure_support_is_added_everywhere( 'MTEXT' );
-               $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
+               $this->ensure_support_is_added_everywhere( 'MATH' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * SVG elements: note that TITLE is both an HTML element and an SVG element
</span><span class="cx" style="display: block; padding: 0 10px">                 * so care must be taken when adding support for either one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 *
+                * FOREIGNOBJECT, DESC, TITLE.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' );
-               $this->ensure_support_is_added_everywhere( 'DESC' );
-               $this->ensure_support_is_added_everywhere( 'TITLE' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->ensure_support_is_added_everywhere( 'SVG' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // These elements are specific to list item scope.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OL' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,21 +151,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OBJECT' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'TEMPLATE' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // MathML Elements
-               $this->ensure_support_is_added_everywhere( 'MI' );
-               $this->ensure_support_is_added_everywhere( 'MO' );
-               $this->ensure_support_is_added_everywhere( 'MN' );
-               $this->ensure_support_is_added_everywhere( 'MS' );
-               $this->ensure_support_is_added_everywhere( 'MTEXT' );
-               $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
+               $this->ensure_support_is_added_everywhere( 'MATH' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * SVG elements: note that TITLE is both an HTML element and an SVG element
</span><span class="cx" style="display: block; padding: 0 10px">                 * so care must be taken when adding support for either one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 *
+                * FOREIGNOBJECT, DESC, TITLE.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' );
-               $this->ensure_support_is_added_everywhere( 'DESC' );
-               $this->ensure_support_is_added_everywhere( 'TITLE' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->ensure_support_is_added_everywhere( 'SVG' );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -201,21 +186,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OBJECT' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'TEMPLATE' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // MathML Elements
-               $this->ensure_support_is_added_everywhere( 'MI' );
-               $this->ensure_support_is_added_everywhere( 'MO' );
-               $this->ensure_support_is_added_everywhere( 'MN' );
-               $this->ensure_support_is_added_everywhere( 'MS' );
-               $this->ensure_support_is_added_everywhere( 'MTEXT' );
-               $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
+               $this->ensure_support_is_added_everywhere( 'MATH' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * SVG elements: note that TITLE is both an HTML element and an SVG element
</span><span class="cx" style="display: block; padding: 0 10px">                 * so care must be taken when adding support for either one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 *
+                * FOREIGNOBJECT, DESC, TITLE.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' );
-               $this->ensure_support_is_added_everywhere( 'DESC' );
-               $this->ensure_support_is_added_everywhere( 'TITLE' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->ensure_support_is_added_everywhere( 'SVG' );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -241,21 +221,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OBJECT' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'TEMPLATE' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // MathML Elements
-               $this->ensure_support_is_added_everywhere( 'MI' );
-               $this->ensure_support_is_added_everywhere( 'MO' );
-               $this->ensure_support_is_added_everywhere( 'MN' );
-               $this->ensure_support_is_added_everywhere( 'MS' );
-               $this->ensure_support_is_added_everywhere( 'MTEXT' );
-               $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
+               $this->ensure_support_is_added_everywhere( 'MATH' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * SVG elements: note that TITLE is both an HTML element and an SVG element
</span><span class="cx" style="display: block; padding: 0 10px">                 * so care must be taken when adding support for either one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 *
+                * FOREIGNOBJECT, DESC, TITLE.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' );
-               $this->ensure_support_is_added_everywhere( 'DESC' );
-               $this->ensure_support_is_added_everywhere( 'TITLE' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->ensure_support_is_added_everywhere( 'SVG' );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -280,21 +255,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OBJECT' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'TEMPLATE' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // MathML Elements
-               $this->ensure_support_is_added_everywhere( 'MI' );
-               $this->ensure_support_is_added_everywhere( 'MO' );
-               $this->ensure_support_is_added_everywhere( 'MN' );
-               $this->ensure_support_is_added_everywhere( 'MS' );
-               $this->ensure_support_is_added_everywhere( 'MTEXT' );
-               $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
+               $this->ensure_support_is_added_everywhere( 'MATH' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * SVG elements: note that TITLE is both an HTML element and an SVG element
</span><span class="cx" style="display: block; padding: 0 10px">                 * so care must be taken when adding support for either one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 *
+                * FOREIGNOBJECT, DESC, TITLE.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' );
-               $this->ensure_support_is_added_everywhere( 'DESC' );
-               $this->ensure_support_is_added_everywhere( 'TITLE' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->ensure_support_is_added_everywhere( 'SVG' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // These elements are specific to TABLE scope.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'HTML' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -335,21 +305,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OBJECT' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'TEMPLATE' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // MathML Elements
-               $this->ensure_support_is_added_everywhere( 'MI' );
-               $this->ensure_support_is_added_everywhere( 'MO' );
-               $this->ensure_support_is_added_everywhere( 'MN' );
-               $this->ensure_support_is_added_everywhere( 'MS' );
-               $this->ensure_support_is_added_everywhere( 'MTEXT' );
-               $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
+               $this->ensure_support_is_added_everywhere( 'MATH' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * SVG elements: note that TITLE is both an HTML element and an SVG element
</span><span class="cx" style="display: block; padding: 0 10px">                 * so care must be taken when adding support for either one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 *
+                * FOREIGNOBJECT, DESC, TITLE.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' );
-               $this->ensure_support_is_added_everywhere( 'DESC' );
-               $this->ensure_support_is_added_everywhere( 'TITLE' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->ensure_support_is_added_everywhere( 'SVG' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // These elements are specific to SELECT scope.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->ensure_support_is_added_everywhere( 'OPTGROUP' );
</span></span></pre>
</div>
</div>

</body>
</html>