WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#27281 closed defect (bug) (fixed)

Videos with a space in the filename can break

Reported by: wonderboymusic Owned by: wonderboymusic
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.6
Component: Media Keywords: has-patch
Focuses: Cc:
PR Number:

Description

The "space" here is actually "\xc2\xa0" - and it's impossible to see: 26-XO Video.m4v

Need to take a look. The file gets passed around through JS, is on the page in JSON for playlists. The problem is that the video won't play. Need to figure out where in the chain to sanitize or not.

Attachments (1)

27281.diff (631 bytes) - added by wonderboymusic 6 years ago.

Download all attachments as: .zip

Change History (6)

This ticket was mentioned in IRC in #wordpress-dev by wonderboymusic. View the logs.


6 years ago

@wonderboymusic
6 years ago

#2 @wonderboymusic
6 years ago

  • Keywords has-patch added; needs-patch removed

27281.diff replaces "\u00a0" / "\xc2\xa" with a non-breaking space in sanitize_file_name(). Fixes it for me.

This ticket was mentioned in IRC in #wordpress-dev by wonderboymusic. View the logs.


6 years ago

#4 @wonderboymusic
6 years ago

My patch fixes this issue, would like feedback on where my preg_replace() should go... ? Are there other funcs that could benefit from this? The RegEx replaces a UTF-8 encoded Unicode representation of a non-breaking space with an old-fashioned space: ' ' #YOLO

#5 @wonderboymusic
6 years ago

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

In 27617:

In sanitize_file_name(), replace a UTF-8-encoded Unicode representation of a non-breaking space (\u00a0 / \xc2\xa) with an old-fashioned space: .

Fixes #27281.

Note: See TracTickets for help on using tickets.