Make WordPress Core

Opened 19 months ago

Last modified 19 months ago

#57331 new defect (bug)

Post slugs are appending '%ef%bf%bc' causing redirection errors

Reported by: danielcho's profile danielcho Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 6.1.1
Component: Posts, Post Types Keywords: reporter-feedback
Focuses: Cc:

Description

We are noticing that certain articles on our site are getting this '%ef%bf%bc' string attached to the end of the post_name/slug, and causing a redirect error. On the front end sometimes the actual string shows up but other times it's just a blank in the url.
If we strip the post_names of this string of characters in the database, it seems to fix the issue, but nothing we are doing on our end seems to be appending them. A quick google search seems to give me the indication that it's related a copy paste error of some sort, but I personally wasn't able to replicate it on my own, though we have dozens of examples of it happening on our site in the past few months.

Examples:
https://www.hercampus.com/school/sjsu/a-peek-into-the-education-system%ef%bf%bc
https://www.hercampus.com/school/york-u/what-does-your-favorite-hozier-song-say-about-you%ef%bf%bc
https://www.hercampus.com/school/psu/be-kind-to-your-retail-workers-on-black-friday%ef%bf%bc%ef%bf%bc%ef%bf%bc%ef%bf%bc%ef%bf%bc%ef%bf%bc%ef%bf%bc%ef%bf%bc%ef%bf%bc
https://www.hercampus.com/school/psu/what-new-fall-jacket-you-should-buy-based-on-your-favorite-thanksgiving-food%ef%bf%bc

Change History (1)

#1 @SergeyBiryukov
19 months ago

  • Keywords reporter-feedback added

Hi there, welcome back to WordPress Trac! Thanks for the report.

This should be fixed in WordPress 6.1 for new posts, the sanitize_title_with_dashes() function was updated to strip the object replacement character (%ef%bf%bc) from post slugs, see [54474] / #55117.

Does it still happen for new posts on a clean install?

Note: See TracTickets for help on using tickets.