Index: wp-includes/link-template.php =================================================================== --- wp-includes/link-template.php (revision 5492) +++ wp-includes/link-template.php (working copy) @@ -139,7 +139,7 @@ $pagestruct = $wp_rewrite->get_page_permastruct(); if ( '' != $pagestruct && 'draft' != $post->post_status ) { - $link = get_page_uri($id); + $link = get_page_uri($id, false); $link = str_replace('%pagename%', $link, $pagestruct); $link = get_option('home') . "/$link"; $link = user_trailingslashit($link, 'page'); Index: wp-includes/post.php =================================================================== --- wp-includes/post.php (revision 5492) +++ wp-includes/post.php (working copy) @@ -1040,9 +1040,9 @@ return $result; } -function get_page_uri($page_id) { +function get_page_uri($page_id, $decode = true) { $page = get_page($page_id); - $uri = urldecode($page->post_name); + $uri = ( $decode ) ? urldecode($page->post_name) : $page->post_name; // A page cannot be it's own parent. if ( $page->post_parent == $page->ID ) @@ -1050,7 +1050,7 @@ while ($page->post_parent != 0) { $page = get_page($page->post_parent); - $uri = urldecode($page->post_name) . "/" . $uri; + $uri = ( $decode ) ? urldecode($page->post_name) . "/" . $uri : $page->post_name . "/" . $uri; } return $uri;