Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#57980 closed defect (bug) (duplicate)

"sanitize_title_with_dashes" function trims dashes incorrectly

Reported by: dam6pl's profile dam6pl Owned by:
Milestone: Priority: normal
Severity: minor Version: 6.1.1
Component: Query Keywords:
Focuses: Cc:



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:


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?


Change History (1)

#1 @SergeyBiryukov
6 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome back to WordPress Trac!

Thanks for the report, we're already tracking this issue in #14773.

Note: See TracTickets for help on using tickets.