Opened 8 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Permalinks | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Steps to reproduce:
- Go to Settings > Permalinks
- Enter "this is a test" in the
category_basefield - Click "Save Changes"
- Notice that
category_basegets 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)