Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php	(revision 7135)
+++ wp-admin/admin-ajax.php	(working copy)
@@ -568,7 +568,7 @@
 case 'sample-permalink':
 	check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
 	$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
-	die(get_sample_permalink_html($post_id, $_POST['new_slug']));
+	die(get_sample_permalink_html($post_id, $_POST['new_title'], $_POST['new_slug']));
 break;
 default :
 	do_action( 'wp_ajax_' . $_POST['action'] );
Index: wp-admin/includes/post.php
===================================================================
--- wp-admin/includes/post.php	(revision 7135)
+++ wp-admin/includes/post.php	(working copy)
@@ -577,7 +577,7 @@
 	}
 }
 
-function get_sample_permalink($id, $name = null) {
+function get_sample_permalink($id, $title, $name = null) {
 	$post = &get_post($id);
 	if (!$post->ID) {
 		return array('', '');
@@ -585,13 +585,17 @@
 	$original_status = $post->post_status;
 	$original_date = $post->post_date;
 	$original_name = $post->post_name;
+	$original_title = $post->post_title;
+
+	$post->post_title = $title;
+	$post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID);
+
 	if (in_array($post->post_status, array('draft', 'pending'))) {
 		$post->post_status = 'publish';
 		$post->post_date = date('Y-m-d H:i:s');
-		$post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID);
 	}
 	if (!is_null($name)) {
-		$post->post_name = sanitize_title($name, $post->ID);
+		$post->post_name = sanitize_title($name? $name : $post->post_title, $post->ID);
 	}
 
 	$permalink = get_permalink($post, true);
@@ -610,12 +614,13 @@
 	$post->post_status = $original_status;
 	$post->post_date = $original_date;
 	$post->post_name = $original_name;
+	$post->post_title = $original_title;
 	return $permalink;
 }
 
-function get_sample_permalink_html($id, $new_slug=null) {
+function get_sample_permalink_html($id, $new_title=null, $new_slug=null) {
 	$post = &get_post($id);
-	list($permalink, $post_name) = get_sample_permalink($post->ID, $new_slug);
+	list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
 	if (false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%')) {
 		return '';
 	}
Index: wp-admin/js/slug.js
===================================================================
--- wp-admin/js/slug.js	(revision 7135)
+++ wp-admin/js/slug.js	(working copy)
@@ -10,11 +10,12 @@
 
 	b.html('<a href="" class="save">'+slugL10n.save+'</a> <a class="cancel" href="">'+slugL10n.cancel+'</a>');
 	b.children('.save').click(function() {
-		var new_slug = e.children('input').attr('value');
+		var new_slug = e.children('input').val();
 		jQuery.post(slugL10n.requestFile, {
 			action: 'sample-permalink',
 			post_id: post_id,
 			new_slug: new_slug,
+			new_title: jQuery('#title').val(),
 			samplepermalinknonce: jQuery('#samplepermalinknonce').val()}, function(data) {
 				jQuery('#edit-slug-box').html(data);
 				b.html(revert_b);
