Page MenuHomePhabricator
Authored By
Grunny
Mar 21 2021, 5:34 PM
Size
1 KB
Referenced Files
None
Subscribers
None

T278014.patch

From 65b0d900790a2fc8b96007425ac9aa850e9fd6dd Mon Sep 17 00:00:00 2001
From: grunny <mwgrunny@gmail.com>
Date: Sat, 20 Mar 2021 04:46:44 +1000
Subject: [PATCH] Escape mediastatistics-header-* messages on Special:NewFiles
The mediastatistics-header-* messages used on Special:NewFiles currently
allow raw HTML as raw options labels are output as raw HTML in forms. We
could change these to use options-messages with the message keys, but it
looks like this was done so the list could be alphabetised based on the
labels and this wouldn't be in alphabetical order if we sorted on the
message keys.
Change-Id: I5f59ccf4c167756255952cfbf31a8d7891463e92
---
includes/specials/SpecialNewFiles.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/specials/SpecialNewFiles.php b/includes/specials/SpecialNewFiles.php
index fc589f1..92798e0 100644
--- a/includes/specials/SpecialNewFiles.php
+++ b/includes/specials/SpecialNewFiles.php
@@ -155,7 +155,7 @@ class SpecialNewFiles extends IncludableSpecialPage {
// mediastatistics-header-office, mediastatistics-header-text,
// mediastatistics-header-executable, mediastatistics-header-archive,
// mediastatistics-header-3d,
- return $this->msg( 'mediastatistics-header-' . strtolower( $type ) )->text();
+ return $this->msg( 'mediastatistics-header-' . strtolower( $type ) )->escaped();
}, $this->mediaTypes );
$mediaTypesOptions = array_combine( $mediaTypesText, $this->mediaTypes );
ksort( $mediaTypesOptions );
--
2.7.4

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8930541
Default Alt Text
T278014.patch (1 KB)

Event Timeline