Make WordPress Core

Ticket #64284: 64284.diff

File 64284.diff, 1.6 KB (added by iflairwebtechnologies, 6 months ago)
  • src/wp-includes/formatting.php

     
    22842284        // Restore octets.
    22852285        $title = preg_replace( '|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title );
    22862286
    2287         if ( wp_is_valid_utf8( $title ) ) {
     2287        if ( seems_utf8( $title ) ) {
    22882288                if ( function_exists( 'mb_strtolower' ) ) {
    22892289                        $title = mb_strtolower( $title, 'UTF-8' );
    22902290                }
     
    22942294        $title = strtolower( $title );
    22952295
    22962296        if ( 'save' === $context ) {
    2297                 // Convert &nbsp, non-breaking hyphen, &ndash, and &mdash to hyphens.
    2298                 $title = str_replace( array( '%c2%a0', '%e2%80%91', '%e2%80%93', '%e2%80%94' ), '-', $title );
    2299                 // Convert &nbsp, non-breaking hyphen, &ndash, and &mdash HTML entities to hyphens.
    2300                 $title = str_replace( array( ' ', '‑', ' ', '–', '–', '—', '—' ), '-', $title );
     2297                // Convert &nbsp, &ndash, and &mdash to hyphens.
     2298                $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title );
     2299                // Convert &nbsp, &ndash, and &mdash HTML entities to hyphens.
     2300                $title = str_replace( array( ' ', ' ', '–', '–', '—', '—' ), '-', $title );
    23012301                // Convert forward slash to hyphen.
    23022302                $title = str_replace( '/', '-', $title );
    23032303
     
    23822382
    23832383                // Convert &times to 'x'.
    23842384                $title = str_replace( '%c3%97', 'x', $title );
     2385
     2386                // Add the new line to convert the multiplication sign (×) directly to "x"
     2387                $title = str_replace( '×', 'x', $title );
    23852388        }
    23862389
    23872390        // Remove HTML entities.