Make WordPress Core

Opened 4 years ago

Closed 2 years ago

Last modified 2 years ago

#48475 closed defect (bug) (duplicate)

Permalink includes hidden characters like U+2028

Reported by: mte90's profile Mte90 Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Severity: normal Version:
Component: Permalinks Keywords:
Focuses: Cc:


How to try:

Copy and paste in a title including this string from (I had to publish there because on Trac this symbols is removed).

You will see an url custom-title-number-2019%e2%80%a8/ saved.

This because the title include this, it is a hidden symbol that WordPress doesn't strip away.
If you copy paste rightly the string to you will see this symbols.

Change History (5)

#1 @SergeyBiryukov
4 years ago

  • Keywords needs-patch needs-unit-tests added
  • Milestone changed from Awaiting Review to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

Related: #44958, #47594, #47912.

#2 @audrasjb
4 years ago

  • Milestone changed from 5.4 to Future Release


With 5.4 Beta 3 approaching and the Beta period reserved for bugs introduced during the cycle, this is being moved to Future Release. If any maintainer or committer feels this should be included or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

#3 @antonvlasenko
2 years ago

  • Keywords reporter-feedback added

Test Report

Testing Environment:

  • Browser: Safari 15.4
  • Theme: Twenty Twenty-One
  • Server: macOS 12.3, PHP 8.0.18 (native), Apache 2.4.53 (native)
  • WordPress: 6.0-alpha-52448-src

Steps to test

  1. Open this page and copy the text with the hidden character.
  2. Paste the text here to make sure it contains the hidden character.
  3. Create a new WordPress post.
  4. Use the text above as a title.
  5. Save the post.
  6. Inspect the url (permalink) of the post.

Expected result:
The URL of the post doesn't contain the hidden character.

Actual result:
The URL of the post doesn't contain the hidden character.

@Mte90 I cannot reproduce this bug.

Could you please provide steps on how to reproduce this issue using the latest WordPress version?

Could this ticket be closed?

Thank you.

#4 @SergeyBiryukov
2 years ago

  • Keywords needs-patch needs-unit-tests reporter-feedback removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from accepted to closed

Thanks for testing!

It looks like this was fixed as part of [51984] / #47912. The %e2%80%a8 character (line separator) is now in the list of characters that are stripped from permalinks via sanitize_title_with_dashes().

#5 @Mte90
2 years ago

I missed that changeset (I am following Trac with RSS), anyway happy that was a duplicate an resolved some months ago :-)

Note: See TracTickets for help on using tickets.