Ticket #10797: 10797.patch
File 10797.patch, 1.0 KB (added by , 13 years ago) |
---|
-
wp-includes/formatting.php
807 807 } 808 808 809 809 /** 810 * Sanitizes title, replacing whitespace with dashes.810 * Sanitizes title, replacing whitespace and a few other characters with dashes. 811 811 * 812 812 * Limits the output to alphanumeric characters, underscore (_) and dash (-). 813 813 * Whitespace becomes a dash. … … 836 836 $title = strtolower($title); 837 837 $title = preg_replace('/&.+?;/', '', $title); // kill entities 838 838 $title = str_replace('.', '-', $title); 839 840 // ndash and mdash 841 $title = str_replace( array( '%e2%80%93', '%e2%80%94' ), '-', $title ); 842 // curly quotes and hellip 843 $title = str_replace( array( '%e2%80%9c', '%e2%80%9d', '%e2%80%98', '%e2%80%99', '%e2%80%a6' ), '', $title ); 844 839 845 $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); 840 846 $title = preg_replace('/\s+/', '-', $title); 841 847 $title = preg_replace('|-+|', '-', $title);