Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#22395 closed enhancement (fixed)

Single accents in the Title field should be removed from URLs, just like apostrophes

Reported by: glueckpress Owned by: nacin
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.4.2
Component: Formatting Keywords: has-patch 3.6-early
Focuses: Cc:


This is about the Title and URL fields in the post edit screen.

Currently, single accents are treated as valid entities for URLs:

TITLE: Als wär´s ein Stück von mir
=> URL: http://domain.tld/als-war´-s-ein-stuck-von-mir
=> URL: http://domain.tld/als-war%C2%B4-s-ein-stuck-von-mir

Note how the accent is inaccurately used as an apostrophe here. Sadly, many users do that.
Because it is a single accent, the same behavior as with an apostrophe would save the URL here:

TITLE: Als wär´s ein Stück von mir (U+00B4 Acute Accent)
TITLE: Als wär`s ein Stück von mir (U+0060 Grave Accent)
TITLE: Als wär's ein Stück von mir (U+0027 Apostrophe)
TITLE: Als wär’s ein Stück von mir (U+2018 Left Single Quotation)
TITLE: Als wär‘s ein Stück von mir (U+2019 Right Single Quotation)


=> URL: http://domain.tld/als-wars-ein-stuck-von-mir

Disclaimer: Is there a need for non-western languages to keep accents and/or single quotations in URLs?

Attachments (1)

22395.patch (652 bytes) - added by SergeyBiryukov 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @rmccue
8 years ago

  • Keywords has-patch added; needs-patch removed

#2 @SergeyBiryukov
8 years ago

  • Component changed from Editor to Formatting
  • Keywords 3.6-early added
  • Milestone changed from Awaiting Review to Future Release

22395.patch adds more acute accents to sanitize_title_with_dashes().

Unit test: [UT1122]

#3 @SergeyBiryukov
8 years ago

  • Milestone changed from Future Release to 3.6

#4 @nacin
8 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 23176:

Remove additional acute accents from permalink slugs via sanitize_title_with_dashes(). props SergeyBiryukov. fixes #22395.

Note: See TracTickets for help on using tickets.