Opened 19 months ago
Closed 19 months ago
#57980 closed defect (bug) (duplicate)
"sanitize_title_with_dashes" function trims dashes incorrectly
Reported by: | dam6pl | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 6.1.1 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
Hello,
I noticed that the "sanitize_title_with_dashes" function when parsing the query removes the dashes from the beginning and end of the page slug, resulting in all the URLs below displaying the same page:
- http://example.com/sample-page/
- http://example.com/sample-page---/
- http://example.com/---sample-page----/
This creates problems in terms of SEO, because several pages, under different URLs, present the same page content.
I'm fully aware that changing this behaviour might break something, but maybe adding a filter to prevent it is a way?
Thanks!
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome back to WordPress Trac!
Thanks for the report, we're already tracking this issue in #14773.