Skip to content

Commit

Permalink
HTML API: Call $this->is_tag_closer() in HTML Processor.
Browse files Browse the repository at this point in the history
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 #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
  • Loading branch information
dmsnell committed Jun 8, 2024
1 parent 1626aac commit d3c1b41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/html-api/class-wp-html-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit d3c1b41

Please sign in to comment.