mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Media: In wp_read_image_metadata() make sure that IPTC keywords are UTF8 encoded.
Prevents missing `_wp_attachment_metadata` when an image contains keywords with latin extended characters. Fixes #35316. git-svn-id: https://develop.svn.wordpress.org/trunk@36429 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -408,12 +408,14 @@ function wp_read_image_metadata( $file ) {
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $meta as &$value ) {
|
||||
if ( is_string( $value ) ) {
|
||||
$value = wp_kses_post( $value );
|
||||
foreach ( $meta['keywords'] as $key => $keyword ) {
|
||||
if ( ! seems_utf8( $keyword ) ) {
|
||||
$meta['keywords'][ $key ] = utf8_encode( $keyword );
|
||||
}
|
||||
}
|
||||
|
||||
$meta = wp_kses_post_deep( $meta );
|
||||
|
||||
/**
|
||||
* Filter the array of meta data read from an image's exif data.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user