Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 21827)
+++ wp-includes/post.php	(working copy)
@@ -3442,6 +3442,8 @@
 	$uri = $page->post_name;
 
 	foreach ( $page->ancestors as $parent ) {
+		/* check that the page is publish status*/
+		if("publish"  ==  get_post_status( $parent ))
 		$uri = get_post( $parent )->post_name . "/" . $uri;
 	}
 
