From 737bf92b9908793c231512842c8306101a85c894 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 5 Nov 2024 19:49:01 +0100 Subject: [PATCH] Restore original bookmark matching --- src/wp-includes/html-api/class-wp-html-processor.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 16acd3771904b..841a024701661 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -5377,8 +5377,7 @@ public function seek( $bookmark_name ): bool { if ( $this->is_virtual() ) { continue; } - $bm = $this->bookmarks[ $this->current_element->token->bookmark_name ]; - if ( $bookmark_starts_at === $bm->start ) { + if ( $bookmark_starts_at === $this->bookmarks[ $this->state->current_token->bookmark_name ]->start ) { while ( isset( $this->current_element ) && WP_HTML_Stack_Event::POP === $this->current_element->operation ) { $this->current_element = array_shift( $this->element_queue ); }