Make WordPress Core

Ticket #47594: 47594.1.diff

File 47594.1.diff, 693 bytes (added by audrasjb, 4 years ago)

Patch refreshed and simplified as per today's bug scrub

  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index b716c6bc1f..25e5e4daa1 100644
    a b function sanitize_title( $title, $fallback_title = '', $context = 'save' ) { 
    21732173        $raw_title = $title;
    21742174
    21752175        if ( 'save' === $context ) {
     2176
     2177                // Change space characters in unicode to the corresponding html entity.
     2178                $title = str_replace(
     2179                        array(
     2180                                '%e2%80%af',
     2181                                '%e2%80%87',
     2182                                '%e2%81%a0',
     2183                                ' ',
     2184                                ' ',
     2185                                ' ',
     2186                                ' ',
     2187                                '⁠',
     2188                                '⁠',
     2189                        ),
     2190                        ' ',
     2191                        $title
     2192                );
     2193
    21762194                $title = remove_accents( $title );
    21772195        }
    21782196