WordPress.org

Make WordPress Core

Opened 2 months ago

#41891 new defect (bug)

Bug when changing $(comments_)pagination_base of WP_Rewite instance to string with non-ASCII characters

Reported by: dimadin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords:
Focuses: Cc:

Description

When you change $pagination_base/$comments_pagination_base for WP_Rewrite instance to string with ASCII characters, it works as expected. But when you change to non-ASCII string, it doesn't work because it redirects from /<pagination_base>/2 to /<pagination_base>/2/<pagination_base>/2 which returns 404. If you use rawurlencode() on that string, it again works as expected.

So, in short:
$GLOBALS['wp_rewrite']->pagination_base = 'something'; - works
$GLOBALS['wp_rewrite']->pagination_base = 'чџш'; - doesn't work
$GLOBALS['wp_rewrite']->pagination_base = rawurlencode( 'чџш' ); - works

This doesn't apply to other bases, they work without rawurlencode(), for example:
$GLOBALS['wp_rewrite']->author_base = 'гдђ';

Change History (0)

Note: See TracTickets for help on using tickets.