Skip to content

Commit a50e262

Browse files
committed
Remove lower-casing behavior of class_list
This is necessary for has_class to work properly. This could be put into a protected method or the class sensitivity could be a parameter if desired.
1 parent c29f5d6 commit a50e262

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/wp-includes/html-api/class-wp-html-tag-processor.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,7 @@ public function paused_at_incomplete_token(): bool {
11261126
* // Outputs: "free <egg> lang-en "
11271127
*
11281128
* @since 6.4.0
1129+
* @since 6.7.0 Class names are no longer force lower-cased.
11291130
*/
11301131
public function class_list() {
11311132
if ( self::STATE_MATCHED_TAG !== $this->parser_state ) {
@@ -1155,12 +1156,7 @@ public function class_list() {
11551156
return;
11561157
}
11571158

1158-
/*
1159-
* CSS class names are case-insensitive in the ASCII range.
1160-
*
1161-
* @see https://www.w3.org/TR/CSS2/syndata.html#x1
1162-
*/
1163-
$name = strtolower( substr( $class, $at, $length ) );
1159+
$name = substr( $class, $at, $length );
11641160
$at += $length;
11651161

11661162
/*

0 commit comments

Comments
 (0)