From 9fb72675429a14f74aea69f21a0884aafc07fc97 Mon Sep 17 00:00:00 2001 From: dmsnell Date: Fri, 2 Feb 2024 23:27:14 +0000 Subject: [PATCH] HTML API: Fix typo setting the wrong self-closing flag. The HTML Processor tracks whether a token was found with the self-closing flag. Depending on the context, this flag may or may not indicate that the element is self closing. Unfortunately it's been tracking the wrong flag: it's been tracking the end-tag flag, which indicates that a token is an end tag. In this patch the right flag is set in the HTML Processor. This hasn't been an issue because the HTML Processor doesn't yet read that stored flag, but it's an important fix to make before adding support for foreign content (SVG and MathML) since that behavior depends on reading the correct flag. Follow-up to [56274]. Props dmsnell. Built from https://develop.svn.wordpress.org/trunk@57528 git-svn-id: http://core.svn.wordpress.org/trunk@57029 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/html-api/class-wp-html-processor.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/html-api/class-wp-html-processor.php b/wp-includes/html-api/class-wp-html-processor.php index 6b0879cde8..dd8e8d5f2d 100644 --- a/wp-includes/html-api/class-wp-html-processor.php +++ b/wp-includes/html-api/class-wp-html-processor.php @@ -548,7 +548,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor { $this->state->current_token = new WP_HTML_Token( $this->bookmark_tag(), $this->get_tag(), - $this->is_tag_closer(), + $this->has_self_closing_flag(), $this->release_internal_bookmark_on_destruct ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 66c797520f..dcfb1865cb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57527'; +$wp_version = '6.5-alpha-57528'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.