Make WordPress Core

Ticket #44793: 44793-3.diff

File 44793-3.diff, 1.0 KB (added by iamdmitrymayorov, 7 years ago)

Minor comment fix for previous patch

  • src/wp-includes/formatting.php

    diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
    index a0438e9c53..93a3e9558d 100644
    function remove_accents( $string ) { 
    19261926                        // grave accent
    19271927                        'Ǜ' => 'U',
    19281928                        'ǜ' => 'u',
     1929                        // Greek and Coptic
     1930                        '΅Ι' => 'I',
     1931                        'ΐ' => 'i',
    19291932                );
    19301933
    19311934                // Used for locale-specific rules
  • tests/phpunit/tests/formatting/RemoveAccents.php

    diff --git tests/phpunit/tests/formatting/RemoveAccents.php tests/phpunit/tests/formatting/RemoveAccents.php
    index 32ea89e5f1..4046c3beed 100644
    class Tests_Formatting_RemoveAccents extends WP_UnitTestCase { 
    143143
    144144                $this->assertEquals( 'Dd', remove_accents( 'Đđ' ) );
    145145        }
     146
     147        /**
     148         * @ticket 44793
     149         */
     150        public function test_remove_greek_coptic() {
     151                $input  = '΅Ιΐ';
     152                $output = 'Ii';
     153
     154                $this->assertEquals( $output, remove_accents( $input ), 'remove_accents replaces greek coptic' );
     155        }
    146156}