From be0bac91d88a5cce135675701802d7ec6cee8ea0 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: http://svn.automattic.com/wordpress/trunk@1336 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 8aec11461..3e5448c43 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; }