[wp-trac] [WordPress Trac] #36386: Fixed request Chinese tag/category response 404
WordPress Trac
noreply at wordpress.org
Thu Mar 31 16:00:24 UTC 2016
#36386: Fixed request Chinese tag/category response 404
-------------------------+-----------------------------
Reporter: xiaochenftx | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Charset | Version: 4.4.1
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
at wp-includes/class-wp.php
Variable $_SERVER\['REQUEST_URI'\] is not urldecode .
Variable $_SERVER\['PATH_INFO'\] is urldecode .
if I request Chinese tag [http://ftxtool.org/index.php/tag/测试/],
this code will be wrong.
{{{
$req_uri = str_replace($pathinfo, '', $req_uri);
}}}
"测试" in $req_uri is %bala%bala%bala...
but "测试" in $pathinfo is "测试"
I have change it to:
{{{
$req_uri = str_replace($pathinfo, '', urldecode( $req_uri ));
}}}
it will be work well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36386>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list