mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Dots in post slugs should be dashed, not dropped. props Denis-de-Bernardy. fixes #9489
git-svn-id: http://svn.automattic.com/wordpress/trunk@10977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b5d4fae306
commit
c64513ba22
@ -676,6 +676,7 @@ function sanitize_title_with_dashes($title) {
|
||||
|
||||
$title = strtolower($title);
|
||||
$title = preg_replace('/&.+?;/', '', $title); // kill entities
|
||||
$title = str_replace('.', '-', $title);
|
||||
$title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
|
||||
$title = preg_replace('/\s+/', '-', $title);
|
||||
$title = preg_replace('|-+|', '-', $title);
|
||||
|
Loading…
Reference in New Issue
Block a user