Ticket #10249: 10249.1.patch
File 10249.1.patch, 1.8 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp.php
159 159 // front. For path info requests, this leaves us with the requesting 160 160 // filename, if any. For 404 requests, this leaves us with the 161 161 // requested permalink. 162 $req_uri = str_replace( $pathinfo, '', $req_uri);162 $req_uri = str_replace( $pathinfo, '', rawurldecode($req_uri) ); 163 163 $req_uri = trim($req_uri, '/'); 164 164 $req_uri = preg_replace("|^$home_path|", '', $req_uri); 165 165 $req_uri = trim($req_uri, '/'); … … 199 199 $request_match = $req_uri . '/' . $request; 200 200 201 201 if ( preg_match("#^$match#", $request_match, $matches) || 202 preg_match("#^$match#", urldecode($request_match), $matches) ) { 202 preg_match("#^$match#", urldecode($request_match), $matches) || 203 preg_match("#^$match#", strtolower( rawurlencode($request_match) ), $matches) ) { 203 204 204 205 if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$([^&\[]+)\[([0-9]+)\]/', $query, $varmatch ) ) { 205 206 // this is a verbose page match, lets check to be sure about it -
wp-includes/post.php
3156 3156 $parts = array_map( 'sanitize_title', $parts ); 3157 3157 3158 3158 $in_string = "'". implode( "','", $parts ) . "'"; 3159 $in_string = str_replace( '%', '%%', $in_string ); 3159 3160 $pages = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name IN ({$in_string}) AND (post_type = %s OR post_type = 'attachment')", $post_type ), OBJECT_K ); 3160 3161 3161 3162 $revparts = array_reverse( $parts );