Merge "Synchronize allowed attributes for <audio> with Parsoid/TimedMediaHandler"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 26 Apr 2019 19:10:10 +0000 (19:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 26 Apr 2019 19:10:10 +0000 (19:10 +0000)
includes/parser/Sanitizer.php

index 518846c..35a5944 100644 (file)
@@ -1918,7 +1918,8 @@ class Sanitizer {
                        # such as <math> when it is rasterized, or if $wgAllowImageTag is
                        # true
                        'img'        => array_merge( $common, [ 'alt', 'src', 'width', 'height', 'srcset' ] ),
-
+                       # Attributes for A/V tags added in T163583 / T133673
+                       'audio'      => array_merge( $common, [ 'controls', 'preload', 'width', 'height' ] ),
                        'video'      => array_merge( $common, [ 'poster', 'controls', 'preload', 'width', 'height' ] ),
                        'source'     => array_merge( $common, [ 'type', 'src' ] ),
                        'track'      => array_merge( $common, [ 'type', 'src', 'srclang', 'kind', 'label' ] ),