Ticket #3843: formatting-7-2-4am.diff
| File formatting-7-2-4am.diff, 1.0 kB (added by noel, 4 months ago) |
|---|
-
wp-includes/formatting.php
old new 348 348 $title = str_replace('%', '', $title); 349 349 // Restore octets. 350 350 $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); 351 351 352 // Preserve escaped octets. 353 $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title); 354 // Fix unicode characters in the wrong category 355 $title = preg_replace( '/[\p{P}\p{So}\p{M}\p{No}\p{Nl}]/u', '-', $title); 356 // Restore octets. 357 $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); 358 352 359 $title = remove_accents($title); 353 360 if (seems_utf8($title)) { 354 361 if (function_exists('mb_strtolower')) { … … 356 363 } 357 364 $title = utf8_uri_encode($title, 200); 358 365 } 359 366 360 367 $title = strtolower($title); 361 368 $title = preg_replace('/&.+?;/', '', $title); // kill entities 362 369 $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
