jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370236 )

Change subject: sanitizer: Match Parsoid's attribute sanitation
......................................................................


sanitizer: Match Parsoid's attribute sanitation

Change-Id: I23323dced95c80eb24aa65df68dcbe5ecbad1c75
---
M includes/Sanitizer.php
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  C. Scott Ananian: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index 1562288..b6b7922 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -1914,7 +1914,7 @@
                        # Not usually allowed, but may be used for 
extension-style hooks
                        # such as <math> when it is rasterized, or if 
$wgAllowImageTag is
                        # true
-                       'img'        => array_merge( $common, [ 'alt', 'src', 
'width', 'height' ] ),
+                       'img'        => array_merge( $common, [ 'alt', 'src', 
'width', 'height', 'srcset' ] ),
 
                        'video'      => array_merge( $common, [ 'poster', 
'controls', 'preload', 'width', 'height' ] ),
                        'source'     => array_merge( $common, [ 'type', 'src' ] 
),
@@ -1951,6 +1951,10 @@
                        # https://www.w3.org/TR/REC-MathML/
                        'math'       => [ 'class', 'style', 'id', 'title' ],
 
+                       // HTML 5 section 4.5
+                       'figure'     => $common,
+                       'figcaption' => $common,
+
                        # HTML 5 section 4.6
                        'bdi' => $common,
 
@@ -1966,7 +1970,7 @@
                        // (ie: validateTag rejects tags missing the attributes 
needed for Microdata)
                        // So we don't bother including $common attributes that 
have no purpose.
                        'meta' => [ 'itemprop', 'content' ],
-                       'link' => [ 'itemprop', 'href' ],
+                       'link' => [ 'itemprop', 'href', 'title' ],
                ];
 
                return $whitelist;

-- 
To view, visit https://gerrit.wikimedia.org/r/370236
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I23323dced95c80eb24aa65df68dcbe5ecbad1c75
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>
Gerrit-Reviewer: C. Scott Ananian <canan...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to