[wp-trac] [WordPress Trac] #3727: WP->parse_request() won't replace
$pathinfo when $req_uri contains any %## encoding character.
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 31 04:40:32 GMT 2007
#3727: WP->parse_request() won't replace $pathinfo when $req_uri contains any %##
encoding character.
-----------------------+----------------------------------------------------
Reporter: Kirin_Lin | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.1.1
Component: General | Version: 2.1
Severity: normal | Keywords:
-----------------------+----------------------------------------------------
I write blog in Chinese. WordPress can't use index_permalinks which
contains "%postname%". The problem is using slug not in English, which
will be urlencoded to %## format.
In WP2.1, wp-includes/classes.php line '''61''' and in WP2.0, wp-
includes/classes.php line '''1528''':
{{{
$req_uri = str_replace($pathinfo, '', $req_uri);
}}}
When I use Chinese slug, the $pathinfo will be like "2007/01/31/測試" and
the $requri will be "/index.php/2007/01/31/%e6%b8%ac%e8%a9%a6/". That
makes the function of above doesn't work.
It should be like this:
{{{
$req_uri = str_replace($pathinfo, '', urldecode($req_uri));
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/3727>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list