From d3c1b41ba150fe6d6fdffad5de93926786a2cdfe Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Sat, 8 Jun 2024 12:10:42 +0000 Subject: [PATCH] HTML API: Call `$this->is_tag_closer()` in HTML Processor. The HTML Processor had been calling the parent class `is_tag_closer()` method, but since visiting virtual nodes was introduced, it's important that all of the methods are called on the subclass. This patch fixes one issue identified where the parent method was called instead, and it fixes another case where the change from calling the parent method to the `$this` method was done improperly. Developed in https://github.com/WordPress/wordpress-develop/pull/6726 Discussed in https://core.trac.wordpress.org/ticket/61348 Props jonsurrell. See #61348. Follow-up to [58304]. git-svn-id: https://develop.svn.wordpress.org/trunk@58365 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/html-api/class-wp-html-processor.php | 4 ++-- 1 file changed, 2 insertions(+), 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 0511035607870..528c222335b75 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -429,7 +429,7 @@ public function next_tag( $query = null ) { continue; } - if ( ! $this::is_tag_closer() || $visit_closers ) { + if ( ! $this->is_tag_closer() || $visit_closers ) { return true; } } @@ -464,7 +464,7 @@ public function next_tag( $query = null ) { continue; } - if ( ! parent::is_tag_closer() || $visit_closers ) { + if ( ! $this->is_tag_closer() || $visit_closers ) { return true; } }