urldecode page URI so that it will work for multibyte languages.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3ec05be4d2
commit
626a4d0c83
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue