Taxonomy Rewrite Strips Spaces from Querystring Vars
|Reported by:||MathSmath||Owned by:||dd32|
On custom taxonomy listings pages, adding pagination vars will cause any custom querystring vars to be stripped of all spaces on rewrite.
For example, the request
is rewritten to
This does not happen on the initial results page. For example, if you visit
The space stays intact in the custom querystring var.
Steps to reproduce
1) Clean install of trunk, with no plugins enabled, using the default theme.
2) Create a custom taxonomy and apply it to any content type (I used posts for my test, but this problem also occurs with custom content types). Does not seem to matter whether you use a custom slug or not when defining the taxonomy.
register_taxonomy( 'my-categories', array( 'post', ), array( 'hierarchical' => true, 'label' => 'My Categories' ) );
3) Add a term to the new taxonomy using the admin, and assign it to an item or series of items.
4) Visit the archive page for that term, adding any custom variable to the querystring. This custom variable should be two words (for example, "?something=one+two")
5) Either manually, or using next/previous links, navigate to a secondary results page (ex. /page/2/), keeping your custom variable intact.
Any spaces in the custom variable are stripped. This happens no matter how the spaces are urlencoded (as a plus, as %20, or as actual spaces). Adding the custom variable to the vars list using the query_vars filter has no effect.
Change History (10)
- Component changed from General to Canonical
- Milestone changed from Awaiting Review to 3.3
- Owner set to dd32
- Status changed from new to accepted