Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#50231 closed defect (bug) (fixed)

Add missing characters in `$special_chars` array in `sanitize_file_name()` function

Reported by: audrasjb's profile audrasjb Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: Cc:

Description

That would be nice to add curly quote and few quotation mark types from $special_chars array in sanitize_file_name() function.

Use case: in French Mac OS systems, the default filename for screenshot is Capture d’écran 2020-05-23 à 13.59.38.png.

Related: #22363

Attachments (1)

50231.diff (837 bytes) - added by audrasjb 5 years ago.
Media: add missing punctuation characters in $special_char array in sanitize_file_name function

Download all attachments as: .zip

Change History (6)

@audrasjb
5 years ago

Media: add missing punctuation characters in $special_char array in sanitize_file_name function

#1 @audrasjb
5 years ago

  • Keywords has-patch added; needs-patch removed

#2 @audrasjb
5 years ago

  • Milestone changed from Awaiting Review to 5.5

Moving to milestone 5.5 so hopefully it could be addressed alongside #22363 🤞

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


5 years ago

#4 @SergeyBiryukov
5 years ago

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

In 48596:

Media: Filter out a few more special characters in sanitize_file_name().

Props audrasjb.
Fixes #50231.

#5 @audrasjb
5 years ago

Great news! Thank you @SergeyBiryukov !

I hope the partial fix for #22363 will make it as well :D

Note: See TracTickets for help on using tickets.