Skip to content

Commit

Permalink
Undo added element support.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Jul 6, 2024
1 parent 564286b commit 2746122
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/wp-includes/html-api/class-wp-html-open-elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,14 @@ public function has_element_in_scope( $tag_name ) {
return $this->has_element_in_specific_scope(
$tag_name,
array(
'APPLET',
'MARQUEE',
'OBJECT',

/*
* Because it's not currently possible to encounter
* one of the termination elements, they don't need
* to be listed here. If they were, they would be
* unreachable and only waste CPU cycles while
* scanning through HTML.
*/
)
);
}
Expand Down Expand Up @@ -534,10 +539,7 @@ public function after_element_push( $item ) {
* cases where the precalculated value needs to change.
*/
switch ( $item->node_name ) {
case 'APPLET':
case 'BUTTON':
case 'MARQUEE':
case 'OBJECT':
$this->has_p_in_button_scope = false;
break;

Expand Down

0 comments on commit 2746122

Please sign in to comment.