HTML API: Recognize all uppercase tag names in tag processor.
Some checks are pending
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} (false) (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} (true) (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Performance tests ${{ matrix.memcached && '(with memcached)' || '' }} (false) (push) Waiting to run
Performance Tests / Performance tests ${{ matrix.memcached && '(with memcached)' || '' }} (true) (push) Waiting to run
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.4, example.org:8889) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.0, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.1, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.4, example.org:8889) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.0, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.1, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, true, false, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, true, true, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 7.2, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 7.3, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 7.4, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.0, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.1, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.2, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.3, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.4, true, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 7.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 7.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.0, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.1, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 7.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 7.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 8.0, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 8.1, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 8.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 8.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, false, ubuntu-latest, 8.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 7.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 7.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 8.0, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 8.1, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 8.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 8.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.4, false, true, ubuntu-latest, 8.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, false, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, false, ubuntu-latest, 8.0, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, false, ubuntu-latest, 8.1, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, false, ubuntu-latest, 8.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, false, ubuntu-latest, 8.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, false, ubuntu-latest, 8.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, true, ubuntu-latest, 7.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, true, ubuntu-latest, 8.0, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, true, ubuntu-latest, 8.1, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, true, ubuntu-latest, 8.2, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, true, ubuntu-latest, 8.3, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 9.0, false, true, ubuntu-latest, 8.4, example.org) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 7.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 7.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.0) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.1) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.2) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.3) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, true, false, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, true, true, ubuntu-latest, 7.4) (push) Waiting to run
PHPUnit Tests / Slack Notifications (push) Blocked by required conditions
PHPUnit Tests / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from ${{ matrix.directory }} (build, ubuntu-latest, ${{ github.event_name == 'pull_request' && true || '' }}, true) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (build, windows-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (src, ubuntu-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (src, windows-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (build, macos-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (src, macos-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, ubuntu-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, windows-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, ubuntu-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, windows-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, macos-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, macos-latest) (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions

Fixes a missing "D" in the character list used by strspn to find tag openers, causing tags starting with D to be skipped by the tag processor in some circumstances.

Follow-up to [58613].

Props jonsurrell, santosguillamot, wongjn, cbravobernal.
Fixes #62522.


git-svn-id: https://develop.svn.wordpress.org/trunk@59464 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Carlos Bravo 2024-11-27 09:55:53 +00:00
parent 6ed2409945
commit 9840f03281
2 changed files with 63 additions and 1 deletions

View File

@ -1668,7 +1668,7 @@ class WP_HTML_Tag_Processor {
*
* @see https://html.spec.whatwg.org/#tag-open-state
*/
if ( 1 !== strspn( $html, '!/?abcdefghijklmnopqrstuvwxyzABCEFGHIJKLMNOPQRSTUVWXYZ', $at + 1, 1 ) ) {
if ( 1 !== strspn( $html, '!/?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $at + 1, 1 ) ) {
++$at;
continue;
}

View File

@ -2984,4 +2984,66 @@ HTML
$this->assertNull( $doctype->public_identifier );
$this->assertNull( $doctype->system_identifier );
}
/**
* @ticket 62522
*
* @dataProvider data_alphabet_by_characters_lowercase
*/
public function test_recognizes_lowercase_tag_name( string $char ) {
/*
* The spacing in the HTML string is important to the problematic
* codepath in ticket #62522.
*/
$html = " <{$char}> </{$char}>";
$processor = new WP_HTML_Tag_Processor( $html );
$this->assertTrue( $processor->next_tag(), "Failed to find open tag in '{$html}'." );
$this->assertTrue(
$processor->next_tag( array( 'tag_closers' => 'visit' ) ),
"Failed to find close tag in '{$html}'."
);
}
/**
* @ticket 62522
*
* @dataProvider data_alphabet_by_characters_uppercase
*/
public function test_recognizes_uppercase_tag_name( string $char ) {
/*
* The spacing in the HTML string is important to the problematic
* codepath in ticket #62522.
*/
$html = " <{$char}> </{$char}>";
$processor = new WP_HTML_Tag_Processor( $html );
$this->assertTrue( $processor->next_tag(), "Failed to find open tag in '{$html}'." );
$this->assertTrue(
$processor->next_tag( array( 'tag_closers' => 'visit' ) ),
"Failed to find close tag in '{$html}'."
);
}
/**
* Data provider.
*
* @return Generator<array>
*/
public static function data_alphabet_by_characters_lowercase() {
$char = 'a';
while ( $char <= 'z' ) {
yield $char => array( $char );
$char = chr( ord( $char ) + 1 );
}
}
/**
* Data provider.
*
* @return Generator<array>
*/
public static function data_alphabet_by_characters_uppercase() {
foreach ( self::data_alphabet_by_characters_lowercase() as $data ) {
yield strtoupper( $data[0] ) => array( strtoupper( $data[0] ) );
}
}
}