strip leading and trailing dashes from post slugs

git-svn-id: http://svn.automattic.com/wordpress/trunk@1336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2004-05-21 21:35:16 +00:00
parent 8055e88898
commit be0bac91d8
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ function sanitize_title_with_dashes($title) {
$title = preg_replace('/\s+/', ' ', $title);
$title = str_replace(' ', '-', $title);
$title = preg_replace('|-+|', '-', $title);
$title = trim($title);
$title = trim($title, '-');
return $title;
}