fix for multiple hypens.
git-svn-id: http://svn.automattic.com/wordpress/trunk@774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e2d9617bd6
commit
5c4302e582
|
@ -93,6 +93,7 @@ function sanitize_title($title) {
|
||||||
$title = preg_replace('/\s+/', ' ', $title);
|
$title = preg_replace('/\s+/', ' ', $title);
|
||||||
$title = trim($title);
|
$title = trim($title);
|
||||||
$title = str_replace(' ', '-', $title);
|
$title = str_replace(' ', '-', $title);
|
||||||
|
$title = preg_replace('|[-]+|', '-', $title);
|
||||||
return $title;
|
return $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue