Commit d54b7924ef for wordpress.org

commit d54b7924efcdee6f225508173a7f11f1aff62eb2
Author: czapla <czapla@git.wordpress.org>
Date:   Tue Nov 19 16:05:17 2024 +0000

    HTML API: Use case insensitive tag_name comparison in `::next_tag`.

    The HTML API `::next_tag` method now performs case-insensitive matching when searching for tags by name. For example, searching for 'DIV' will match both '<div>' and '<DIV>' tags.

    Props jonsurrell, dmsnell.
    Fixes #62427.

    Built from https://develop.svn.wordpress.org/trunk@59422


    git-svn-id: http://core.svn.wordpress.org/trunk@58808 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/html-api/class-wp-html-processor.php b/wp-includes/html-api/class-wp-html-processor.php
index 9abc782d0c..cfcd6bdb94 100644
--- a/wp-includes/html-api/class-wp-html-processor.php
+++ b/wp-includes/html-api/class-wp-html-processor.php
@@ -557,6 +557,10 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
 			return false;
 		}

+		if ( isset( $query['tag_name'] ) ) {
+			$query['tag_name'] = strtoupper( $query['tag_name'] );
+		}
+
 		$needs_class = ( isset( $query['class_name'] ) && is_string( $query['class_name'] ) )
 			? $query['class_name']
 			: null;
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 4846ac917c..998689abce 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '6.8-alpha-59419';
+$wp_version = '6.8-alpha-59422';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.