Make WordPress Core


Ignore:
Timestamp:
12/18/2024 06:38:58 PM (20 months ago)
Author:
desrosj
Message:

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.

Reviewed by desrosj.
Merges [59422] to the 6.7 branch.

Props jonsurrell, dmsnell, czapla.
Fixes #62427.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/src/wp-includes/html-api/class-wp-html-processor.php

    r59411 r59535  
    558558                }
    559559
     560                if ( isset( $query['tag_name'] ) ) {
     561                        $query['tag_name'] = strtoupper( $query['tag_name'] );
     562                }
     563
    560564                $needs_class = ( isset( $query['class_name'] ) && is_string( $query['class_name'] ) )
    561565                        ? $query['class_name']
Note: See TracChangeset for help on using the changeset viewer.