WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#36386 closed enhancement (duplicate)

Fixed request Chinese tag/category response 404

Reported by: xiaochenftx Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4.1
Component: Permalinks Keywords:
Focuses: Cc:
PR Number:

Description

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.

Change History (1)

#1 @SergeyBiryukov
4 years ago

  • Component changed from Charset to Permalinks
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @xiaochenftx, welcome to Trac!

Thanks for the report, we're already tracking this issue in #10249 and #17450.

Note: See TracTickets for help on using tickets.