From fbf29e0c8b2becbf82999449170555f15e31f6f6 Mon Sep 17 00:00:00 2001 From: Niels Lange Date: Sat, 7 May 2022 17:03:43 +0700 Subject: [PATCH] Fix #54088 --- src/wp-includes/formatting.php | 1 + tests/phpunit/tests/formatting/removeAccents.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 06e0f26aaefa9..da19ba35f6e27 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -1636,6 +1636,7 @@ function remove_accents( $string, $locale = '' ) { 'â' => 'a', 'ã' => 'a', 'ä' => 'a', + 'å' => 'a', 'å' => 'a', 'æ' => 'ae', 'ç' => 'c', diff --git a/tests/phpunit/tests/formatting/removeAccents.php b/tests/phpunit/tests/formatting/removeAccents.php index 2ebea564a5d85..eb0af0d1c9360 100644 --- a/tests/phpunit/tests/formatting/removeAccents.php +++ b/tests/phpunit/tests/formatting/removeAccents.php @@ -12,8 +12,8 @@ public function test_remove_accents_simple() { * @ticket 9591 */ public function test_remove_accents_latin1_supplement() { - $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'; - $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy'; + $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäååæçèéêëìíîïðñòóôõöøùúûüýþÿ'; + $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaaeceeeeiiiidnoooooouuuuythy'; $this->assertSame( $output, remove_accents( $input ), 'remove_accents replaces Latin-1 Supplement' ); }