Interactivity API: Fatal error processing incorrect closed tags.
Fix for fatal errors caused by incorrect closing tags in HTML, such as `</br>`. In these cases, the `get_attribute_names_with_prefix` method of the `WP_HTML_Tag_Processor` returns `null`, and the Interactivity API was not handling this situation correctly. Props hugosolar, jonsurrell, darerodz. Fixes #63891. Built from https://develop.svn.wordpress.org/trunk@61197 git-svn-id: http://core.svn.wordpress.org/trunk@60533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -520,7 +520,12 @@ final class WP_Interactivity_API {
|
||||
array_pop( $tag_stack );
|
||||
}
|
||||
} else {
|
||||
if ( 0 !== count( $p->get_attribute_names_with_prefix( 'data-wp-each-child' ) ) ) {
|
||||
$each_child_attrs = $p->get_attribute_names_with_prefix( 'data-wp-each-child' );
|
||||
if ( null === $each_child_attrs ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( 0 !== count( $each_child_attrs ) ) {
|
||||
/*
|
||||
* If the tag has a `data-wp-each-child` directive, jump to its closer
|
||||
* tag because those tags have already been processed.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.9-beta4-61196';
|
||||
$wp_version = '6.9-beta4-61197';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user