Make WordPress Core


Ignore:
Timestamp:
11/19/2024 04:03:08 PM (4 months ago)
Author:
czapla
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.

Props jonsurrell, dmsnell.
Fixes #62427.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-processor.php

    r59410 r59422  
    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.