Ticket #16036: 16036.patch
File 16036.patch, 916 bytes (added by , 14 years ago) |
---|
-
wp-includes/formatting.php
818 818 } 819 819 820 820 /** 821 * Sanitizes title, replacing whitespace with dashes.821 * Sanitizes title, replacing whitespace and a few other characters with dashes. 822 822 * 823 823 * Limits the output to alphanumeric characters, underscore (_) and dash (-). 824 * Whitespace becomes a dash.825 824 * 826 825 * @since 1.2.0 827 826 * … … 847 846 $title = strtolower($title); 848 847 $title = preg_replace('/&.+?;/', '', $title); // kill entities 849 848 $title = str_replace('.', '-', $title); 849 $title = str_replace( array( '%e2%80%93', '%e2%80%94' ), '-', $title ); // ndash and mdash octets 850 850 $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); 851 851 $title = preg_replace('/\s+/', '-', $title); 852 852 $title = preg_replace('|-+|', '-', $title);