strip leading and trailing dashes from post slugs

git-svn-id: https://develop.svn.wordpress.org/trunk@1336 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
michelvaldrighi 2004-05-21 21:35:16 +00:00
parent 63f7bf9723
commit 5ffeea8e7c
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;
}