Skip to content

Commit 2746122

Browse files
committed
Undo added element support.
1 parent 564286b commit 2746122

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/wp-includes/html-api/class-wp-html-open-elements.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,14 @@ public function has_element_in_scope( $tag_name ) {
237237
return $this->has_element_in_specific_scope(
238238
$tag_name,
239239
array(
240-
'APPLET',
241-
'MARQUEE',
242-
'OBJECT',
240+
241+
/*
242+
* Because it's not currently possible to encounter
243+
* one of the termination elements, they don't need
244+
* to be listed here. If they were, they would be
245+
* unreachable and only waste CPU cycles while
246+
* scanning through HTML.
247+
*/
243248
)
244249
);
245250
}
@@ -534,10 +539,7 @@ public function after_element_push( $item ) {
534539
* cases where the precalculated value needs to change.
535540
*/
536541
switch ( $item->node_name ) {
537-
case 'APPLET':
538542
case 'BUTTON':
539-
case 'MARQUEE':
540-
case 'OBJECT':
541543
$this->has_p_in_button_scope = false;
542544
break;
543545

0 commit comments

Comments
 (0)