From 82acac80218bf8bd27ccc33af1d6091dfff43fa4 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 2 Nov 2004 01:56:29 +0000 Subject: [PATCH] urldecode page URI so that it will work for multibyte languages. git-svn-id: https://develop.svn.wordpress.org/trunk@1841 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0ae2149a38..bace8d65ee 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1346,11 +1346,11 @@ function get_page_uri($page) { global $wpdb; $page = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$page'"); - $uri = $page->post_name; + $uri = urldecode($page->post_name); while ($page->post_parent != 0) { $page = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$page->post_parent'"); - $uri = $page->post_name . "/" . $uri; + $uri = urldecode($page->post_name) . "/" . $uri; } return $uri; @@ -1363,7 +1363,7 @@ function page_rewrite_rules() { if( is_array( $uris ) ) { foreach ($uris as $uri => $pagename) { - $rewrite_rules += array($uri . '/?$' => "index.php?pagename=$pagename"); + $rewrite_rules += array($uri . '/?$' => "index.php?pagename=" . urldecode($pagename)); } }