Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#34571 new defect (bug)

Thumbnails and featured images broken if the filename contains utf8 characters (e.g. üäö)

Reported by: smuts's profile smuts Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3.1
Component: Media Keywords:
Focuses: Cc:


I did an upgrade to 4.3.1 from 3.6.1 and I have a whole bunch of media assets (more than 4000 images) where a substantial portion of these images have filenames containing utf8 characters like apostrophes, umlauts etc.

While these images work just fine in posts, neither the "feature image" nor the thumbnail in the media library will work for that image (broken image icon, rename plugins won't work, feature image shows broken image icon).

Both functionalities worked fine in 3.6.1

I would be grateful if the media library and the featured image functionally could be fixed so that the media library will work for these files again as well as the feature image.

Change History (4)

#2 @swissspidy
8 years ago

  • Milestone Awaiting Review deleted

I don't think that ever worked, see #22363 for a longer discussion on properly sanitizing filenames. Not every browser supports the characters you mentioned in filenames/URLs, that's why ä should replaced with ae for instance.

So I'd say this is a duplicate of #22363.

#3 @swissspidy
8 years ago

  • Milestone set to Awaiting Review

#4 @smuts
8 years ago

@sebastian.pisula - your suggestion is not a solution as it santitizes new uploads. The case refers to existing assets when coming from an upgrade.

@swissspidy - I agree that a failsafe solution would be proper sanitizing everything, including assets. Turns out that non-sanizized images in <img> tags do not seem to be a big issue as to our tests. For us non-sanitized images worked in 3.5 and 3.6, we just bumped into it when upgrading to 4.3.1 recently.

The biggest headache as part of the upgrade was that these non-sanitized assets "broke" in the upgrade: the image library would not let us work with these assets and all plugins that extend the library, and potentially would allow us to sanitize names, would break.

Note: See TracTickets for help on using tickets.