Merge "Match Parsoid's attribute sanitization for video elements"
[lhc/web/wiklou.git] / includes / media / FormatMetadata.php
index 51a0135..2c541e0 100644 (file)
@@ -24,6 +24,7 @@
  * @see http://exif.org/Exif2-2.PDF The Exif 2.2 specification
  * @file
  */
+use Wikimedia\Timestamp\TimestampException;
 
 /**
  * Format Image metadata values into a human readable form.
@@ -100,6 +101,9 @@ class FormatMetadata extends ContextSource {
        public function makeFormattedData( $tags ) {
                $resolutionunit = !isset( $tags['ResolutionUnit'] ) || $tags['ResolutionUnit'] == 2 ? 2 : 3;
                unset( $tags['ResolutionUnit'] );
+               // Width and height are for internal use and already available & displayed outside of metadata
+               unset( $tags['Width'] );
+               unset( $tags['Height'] );
 
                foreach ( $tags as $tag => &$vals ) {
                        // This seems ugly to wrap non-array's in an array just to unwrap again,