Ticket #64284: 64284.diff
| File 64284.diff, 1.6 KB (added by , 6 months ago) |
|---|
-
src/wp-includes/formatting.php
2284 2284 // Restore octets. 2285 2285 $title = preg_replace( '|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title ); 2286 2286 2287 if ( wp_is_valid_utf8( $title ) ) {2287 if ( seems_utf8( $title ) ) { 2288 2288 if ( function_exists( 'mb_strtolower' ) ) { 2289 2289 $title = mb_strtolower( $title, 'UTF-8' ); 2290 2290 } … … 2294 2294 $title = strtolower( $title ); 2295 2295 2296 2296 if ( 'save' === $context ) { 2297 // Convert  , non-breaking hyphen,&ndash, and &mdash to hyphens.2298 $title = str_replace( array( '%c2%a0', '%e2%80%9 1', '%e2%80%93', '%e2%80%94' ), '-', $title );2299 // Convert  , non-breaking hyphen,&ndash, and &mdash HTML entities to hyphens.2300 $title = str_replace( array( ' ', '&# 8209;', ' ', '–', '–', '—', '—' ), '-', $title );2297 // Convert  , &ndash, and &mdash to hyphens. 2298 $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title ); 2299 // Convert  , &ndash, and &mdash HTML entities to hyphens. 2300 $title = str_replace( array( ' ', ' ', '–', '–', '—', '—' ), '-', $title ); 2301 2301 // Convert forward slash to hyphen. 2302 2302 $title = str_replace( '/', '-', $title ); 2303 2303 … … 2382 2382 2383 2383 // Convert × to 'x'. 2384 2384 $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 ); 2385 2388 } 2386 2389 2387 2390 // Remove HTML entities.