Sanitize_title shouldn't strip existing hypens.

git-svn-id: http://svn.automattic.com/wordpress/trunk@505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-10-31 14:19:26 +00:00
parent f9e53adb93
commit 8bf2144a67

View File

@ -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);