Changeset 59422
- Timestamp:
- 11/19/2024 04:03:08 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r59410 r59422 558 558 } 559 559 560 if ( isset( $query['tag_name'] ) ) { 561 $query['tag_name'] = strtoupper( $query['tag_name'] ); 562 } 563 560 564 $needs_class = ( isset( $query['class_name'] ) && is_string( $query['class_name'] ) ) 561 565 ? $query['class_name'] -
trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php
r59392 r59422 1043 1043 $this->assertEquals( $expected_token_counts, $processor->token_seen_count, 'Snapshot: ' . var_export( $processor->token_seen_count, true ) ); 1044 1044 } 1045 1046 /** 1047 * Ensure that lowercased tag_name query matches tags case-insensitively. 1048 * 1049 * @group 62427 1050 */ 1051 public function test_next_tag_lowercase_tag_name() { 1052 // The upper case <DIV> is irrelevant but illustrates the case-insentivity. 1053 $processor = WP_HTML_Processor::create_fragment( '<section><DIV>' ); 1054 $this->assertTrue( $processor->next_tag( array( 'tag_name' => 'div' ) ) ); 1055 1056 // The upper case <RECT> is irrelevant but illustrates the case-insentivity. 1057 $processor = WP_HTML_Processor::create_fragment( '<svg><RECT>' ); 1058 $this->assertTrue( $processor->next_tag( array( 'tag_name' => 'rect' ) ) ); 1059 } 1045 1060 }
Note: See TracChangeset
for help on using the changeset viewer.