Validate image data.

Merges [30458] to the 3.7 branch.

Built from https://develop.svn.wordpress.org/branches/3.7@30465


git-svn-id: http://core.svn.wordpress.org/branches/3.7@30456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-11-20 16:00:09 +00:00
parent 0c8039be21
commit 1e3fb4d13c

View File

@ -314,6 +314,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 );
}
}
return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType );
}