Skip to content

Commit 31a0dee

Browse files
committed
Escape < too for good measure
1 parent b4fbd16 commit 31a0dee

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/wp-includes/fonts/class-wp-font-face.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ protected function normalize_css_font_family( string $font_family ): string {
426426
'\\' => '\\5C ',
427427
',' => '\\2C ',
428428
'"' => '\\22 ',
429+
'<' => '\\3C ',
429430
)
430431
) . '"';
431432
}

tests/phpunit/tests/fonts/font-face/wpFontFace/generateAndPrint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static function data_font_family_normalization() {
5959
'Generic collision' => array( 'serif', '"serif"' ),
6060
'Trims whitespace' => array( ' A font name ', '"A font name"' ),
6161
'Name with \' character' => array( 'O\'Reilly Sans', '"O\'Reilly Sans"' ),
62-
'Unrealistically tricky' => array( "BS\\Quot\"Apos'Semi;Comma,Newline\nLT<Oh😵My!", '"BS\\5C Quot\\22 Apos\'Semi;Comma\\2C Newline\\A LT<Oh😵My!"' ),
62+
'Unrealistically tricky' => array( "BS\\Quot\"Apos'Semi;Comma,Newline\nLT<Oh😵My!", '"BS\\5C Quot\\22 Apos\'Semi;Comma\\2C Newline\\A LT\\3C Oh😵My!"' ),
6363
);
6464
}
6565

0 commit comments

Comments
 (0)