Opened 16 years ago
Closed 16 years ago
#7537 closed enhancement (fixed)
Strip trailing spaces with canonical URLs
Reported by: | matt | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | 2.6 |
Component: | General | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Apparently a really common trailing 404 is %20s, like http://ma.tt/%20%20. We should strip these and redirects. It's from links like this:
<a href="http:/ma.tt/ ">
Attachments (2)
Change History (8)
#2
@
16 years ago
- Keywords has-patch needs-testing added
- Status changed from new to assigned
Try this patch. Fixes it for pretty permalinks and default permalinks (in most situations). As with other things here, I've crafted it to look for specific circumstances, instead of hitting the problem with a big hammer. Let me know if you find a popular 404 case that isn't covered.
Note: See
TracTickets for help on using
tickets.
That shows a draft to me, and is_preview() is true, so Canonical code can't be run. Need to figure out what WP_Query is showing a draft in this situation.