Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#45378 closed defect (bug) (fixed)

Convert soft hyphens when sanitizing titles

Reported by: andg Owned by: pento
Priority: normal Milestone: 5.1
Component: Formatting Version:
Severity: normal Keywords: needs-patch needs-unit-tests
Cc: Focuses:

Description

When copying and pasting titles from a different website, sometimes soft hyphens are included in the copied text. Unfortunately, the sanitize_title_with_dashes function doesn't take care of this eventuality, since it doesn't convert %c2%ad instances to empty strings.

In our client's installation, this led to slugs not being generated correctly, making those posts inaccessible.

Attachments (1)

45378.diff (439 bytes ) - added by andg 8 years ago.
Convert soft hyphens to empty string.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
8 years ago

  • Component GeneralFormatting
  • Keywords needs-patch needs-unit-tests added
  • Milestone Awaiting Review5.1
  • Owner set to SergeyBiryukov
  • Status newaccepted

@andg
8 years ago

Convert soft hyphens to empty string.

#2 @pento
8 years ago

  • Owner changed from SergeyBiryukov to pento
  • Status acceptedassigned

#3 @pento
8 years ago

  • Resolutionfixed
  • Status assignedclosed

In 44579:

Formatting: Remove soft hyphens when sanitising titles.

Props andg.
Fixes #45378.

Note: See TracTickets for help on using tickets.