From 03f090947621849ca8cdb013e52cc628e21321e5 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 13 Feb 2006 07:04:14 +0000 Subject: [PATCH] get_page_by_path() tweak. git-svn-id: https://develop.svn.wordpress.org/trunk@3523 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index acc47336f1..beca14f664 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -665,8 +665,9 @@ function set_page_path($page) { function get_page_by_path($page_path) { global $wpdb; - - $page_path = str_replace('%2F', '/', urlencode(urldecode($page_path))); + $page_path = rawurlencode(urldecode($page_path)); + $page_path = str_replace('%2F', '/', $page_path); + $page_path = str_replace('%20', ' ', $page_path); $page_paths = '/' . trim($page_path, '/'); $leaf_path = sanitize_title(basename($page_paths)); $page_paths = explode('/', $page_paths);