Ticket #10249: page-slugs-urldecode-other-way-round.diff
File page-slugs-urldecode-other-way-round.diff, 1.0 KB (added by , 14 years ago) |
---|
-
wp-includes/classes.php
170 170 // front. For path info requests, this leaves us with the requesting 171 171 // filename, if any. For 404 requests, this leaves us with the 172 172 // requested permalink. 173 $req_uri = str_replace($pathinfo, '', $req_uri);173 $req_uri = str_replace($pathinfo, '', rawurldecode($req_uri)); 174 174 $req_uri = trim($req_uri, '/'); 175 175 $req_uri = preg_replace("|^$home_path|", '', $req_uri); 176 176 $req_uri = trim($req_uri, '/'); … … 207 207 $request_match = $req_uri . '/' . $request; 208 208 209 209 if ( preg_match("#^$match#", $request_match, $matches) || 210 preg_match("#^$match#", urldecode($request_match), $matches) ) { 210 preg_match("#^$match#", urldecode($request_match), $matches) || 211 preg_match("#^$match#", strtolower(rawurlencode($request_match)), $matches)) { 211 212 // Got a match. 212 213 $this->matched_rule = $match; 213 214