diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 5799d28e62..b21e104493 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -366,6 +366,12 @@ function wp_read_image_metadata( $file ) { $meta[ $key ] = utf8_encode( $meta[ $key ] ); } + foreach ( $meta as &$value ) { + if ( is_string( $value ) ) { + $value = wp_kses_post( $value ); + } + } + /** * Filter the array of meta data read from an image's exif data. *