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
This commit is contained in:
parent
b9640d9ec1
commit
82acac8021
|
@ -1346,11 +1346,11 @@ function get_page_uri($page) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$page = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$page'");
|
$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) {
|
while ($page->post_parent != 0) {
|
||||||
$page = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$page->post_parent'");
|
$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;
|
return $uri;
|
||||||
|
@ -1363,7 +1363,7 @@ function page_rewrite_rules() {
|
||||||
if( is_array( $uris ) )
|
if( is_array( $uris ) )
|
||||||
{
|
{
|
||||||
foreach ($uris as $uri => $pagename) {
|
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