From 5ffeea8e7cca0d5619a6c93452f84d4374d06e55 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Fri, 21 May 2004 21:35:16 +0000 Subject: [PATCH] strip leading and trailing dashes from post slugs git-svn-id: https://develop.svn.wordpress.org/trunk@1336 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions-formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index 8aec11461f..3e5448c433 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -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; }