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 41d3b28f22177..41036943c21c6 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -5364,9 +5364,9 @@ public function seek( $bookmark_name ): bool { $this->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_INITIAL; $this->breadcrumbs = array(); - $this->bytes_already_parsed = 0; - $this->parser_state = self::STATE_READY; - $this->next_token(); + $this->bookmarks['initial'] = new WP_HTML_Span( 0, 0 ); + parent::seek( 'initial' ); + unset( $this->bookmarks['initial'] ); } else { $this->change_parsing_namespace( $this->context_node->integration_node_type diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index a5b7645e122ee..e2632c80f6da5 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -591,7 +591,7 @@ class WP_HTML_Tag_Processor { * @since 6.2.0 * @var int */ - protected $bytes_already_parsed = 0; + private $bytes_already_parsed = 0; /** * Byte offset in input document where current token starts.