Index: src/wp-includes/post-functions.php
===================================================================
--- src/wp-includes/post-functions.php	(revision 33868)
+++ src/wp-includes/post-functions.php	(working copy)
@@ -4186,7 +4186,9 @@
 	$uri = $page->post_name;
 
 	foreach ( $page->ancestors as $parent ) {
-		$uri = get_post( $parent )->post_name . '/' . $uri;
+		if ( 'publish' === get_post_status( $parent ) ) {
+			$uri = get_post( $parent )->post_name . '/' . $uri;
+		}
 	}
 
 	return $uri;
