Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#35325 closed defect (bug) (duplicate)

Image metadata not created when IPTC keywords are non-utf8

Reported by: johsw's profile johsw Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords: has-patch needs-unit-tests
Focuses: Cc:


If an image contains non-utf8 IPTC-keywords attachment metadata are not created properly.

The problem is in the function wp_read_image_metadata. Keywords are added to the $meta array (line 334), but the values are not checked for utf8 as other $meta-values are (line 407).

This is causes problems, several places places like media library, when using press images from non-english speaking countries, like Denmark

Attachments (2)

35325.patch (666 bytes) - added by johsw 8 years ago.
A patch for 35325
iptc_wp_fail.jpg (225.5 KB) - added by johsw 8 years ago.
Here is a file that image file that can be used to validate the problem.

Download all attachments as: .zip

Change History (5)

#1 @johsw
8 years ago

The functionality is introduced in this ticket: and committed here:

8 years ago

A patch for 35325

8 years ago

Here is a file that image file that can be used to validate the problem.

#2 @swissspidy
8 years ago

  • Keywords has-patch needs-unit-tests added

#3 @johnbillion
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version set to 4.4

Duplicate of #35316.

Thanks for the patch, @johsw. This was actually fixed recently in [36430]. Sorry your patch got missed!

Note: See TracTickets for help on using tickets.