diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c8f4b10cc..3b77d7dd0 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -88,12 +88,12 @@ function wpautop($pee, $br = 1) { function sanitize_title($title) { $title = strtolower($title); - $title = preg_replace('/&.+;/', '', $title); // kill entities + $title = preg_replace('/&.+?;/', '', $title); // kill entities $title = preg_replace('/[^a-z0-9 -]/', '', $title); $title = preg_replace('/\s+/', ' ', $title); $title = trim($title); $title = str_replace(' ', '-', $title); - $title = preg_replace('|[-]+|', '-', $title); + $title = preg_replace('|-+|', '-', $title); return $title; }