Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#27281 closed defect (bug) (fixed)

Videos with a space in the filename can break

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

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 13 years ago.

Download all attachments as: .zip

Change History (6)

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


13 years ago

#2 @wonderboymusic
13 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.


13 years ago

#4 @wonderboymusic
13 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
13 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → 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.