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
This commit is contained in:
Bernhard Reiter 2024-11-12 12:58:16 +00:00
parent 0be8a89a8f
commit 0c6d68448b
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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.