From 0c6d68448b060b9377fac43da7b2d3622a4a6faa Mon Sep 17 00:00:00 2001 From: Bernhard Reiter Date: Tue, 12 Nov 2024 12:58:16 +0000 Subject: [PATCH] HTML API: Expect closer on foreign content `void` lookalike elements. Ensure that `expects_closer` returns `false` on tags that look like void HTML tags, but are actually ''not'' void tags in foreign content. Props jonsurrell, bernhard-reiter. Fixes #62363. Built from https://develop.svn.wordpress.org/trunk@59392 git-svn-id: http://core.svn.wordpress.org/trunk@58778 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 6a2c7d6fbe..567b65062c 100644 --- a/wp-includes/html-api/class-wp-html-processor.php +++ b/wp-includes/html-api/class-wp-html-processor.php @@ -821,7 +821,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor { // Doctype declarations. 'html' === $token_name || // Void elements. - self::is_void( $token_name ) || + ( 'html' === $token_namespace && self::is_void( $token_name ) ) || // Special atomic elements. ( 'html' === $token_namespace && in_array( $token_name, array( 'IFRAME', 'NOEMBED', 'NOFRAMES', 'SCRIPT', 'STYLE', 'TEXTAREA', 'TITLE', 'XMP' ), true ) ) || // Self-closing elements in foreign content. diff --git a/wp-includes/version.php b/wp-includes/version.php index a75dfbf805..37a70d92aa 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59391'; +$wp_version = '6.8-alpha-59392'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.