Do not sanitize an empty title.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-09-18 05:38:47 +00:00
parent 120f11f4ed
commit 3ec0bc86c0
1 changed files with 9 additions and 2 deletions

View File

@ -287,8 +287,15 @@ case 'editpost':
if (empty($post_name)) { if (empty($post_name)) {
$post_name = $post_title; $post_name = $post_title;
} }
$post_name = sanitize_title($post_name, $post_ID);
if (empty($post_name)) $post_name = sanitize_title($post_title); if (empty($post_name)) {
if (! empty($post_title)) {
$post_name = sanitize_title($post_title, $post_ID);
}
} else {
$post_name = sanitize_title($post_name, $post_ID);
}
$trackback = $_POST['trackback_url']; $trackback = $_POST['trackback_url'];
// Format trackbacks // Format trackbacks
$trackback = preg_replace('|\s+|', '\n', $trackback); $trackback = preg_replace('|\s+|', '\n', $trackback);