Opened 6 years ago
#45819 new defect (bug)
when {category|tag}_base include spaces their rewrite rules don't get generated correctly, resulting in 404's
Reported by: | pbiron | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
Steps to reproduce:
- Go to Settings > Permalinks
- Enter "this is a test" in the
category_base
field - Click "Save Changes"
- Notice that
category_base
gets saved as "this%20is%20a%20test". - Notice that the rewrite rules such as the following get generated:
'this%20is%20a%test/(.+?)?$' => 'index.php?%20was%$matches[1]&%20test%$matches[2]'
instead of (what I imagine the correct rule would be)
'this%20is%20a%test/(.+?)?$' => 'index.php?category_name=$matches[1]
I'm not sure whether the best thing to do is to disallow spaces in {category|tag}_base
or to fixWP_Rewrite::generate_rewrite_rules()
to generate correct rules if they do include spaces.
Note: See
TracTickets for help on using
tickets.