Sanitize_title shouldn't strip existing hypens.
git-svn-id: https://develop.svn.wordpress.org/trunk@505 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a924253139
commit
2a39bceb03
@ -89,7 +89,7 @@ function wpautop($pee, $br=1) {
|
||||
function sanitize_title($title) {
|
||||
$title = strtolower($title);
|
||||
$title = preg_replace('/&.+;/', '', $title); // kill entities
|
||||
$title = preg_replace('/[^a-z0-9 ]/', '', $title);
|
||||
$title = preg_replace('/[^a-z0-9 -]/', '', $title);
|
||||
$title = preg_replace('/\s+/', ' ', $title);
|
||||
$title = trim($title);
|
||||
$title = str_replace(' ', '-', $title);
|
||||
|
Loading…
Reference in New Issue
Block a user