jenkins-bot has submitted this change and it was merged.
Change subject: Escape unescaped content shown in Special:BlockList
......................................................................
Escape unescaped content shown in Special:BlockList
Change-Id: I38bd12613b4066c312635f9920a9e2d2002dbf6d
---
M includes/specials/SpecialBlockList.php
1 file changed, 19 insertions(+), 11 deletions(-)
Approvals:
Umherirrender: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialBlockList.php
b/includes/specials/SpecialBlockList.php
index 8a9aefd..ebc02a5 100644
--- a/includes/specials/SpecialBlockList.php
+++ b/includes/specials/SpecialBlockList.php
@@ -77,11 +77,11 @@
),
'Options' => array(
'type' => 'multiselect',
- 'options' => array(
- $this->msg( 'blocklist-userblocks'
)->text() => 'userblocks',
- $this->msg( 'blocklist-tempblocks'
)->text() => 'tempblocks',
- $this->msg( 'blocklist-addressblocks'
)->text() => 'addressblocks',
- $this->msg( 'blocklist-rangeblocks'
)->text() => 'rangeblocks',
+ 'options-messages' => array(
+ 'blocklist-userblocks' => 'userblocks',
+ 'blocklist-tempblocks' => 'tempblocks',
+ 'blocklist-addressblocks' =>
'addressblocks',
+ 'blocklist-rangeblocks' =>
'rangeblocks',
),
'flatlist' => true,
),
@@ -249,7 +249,7 @@
function formatValue( $name, $value ) {
static $msg = null;
if ( $msg === null ) {
- $msg = array(
+ $keys = array(
'anononlyblock',
'createaccountblock',
'noautoblockblock',
@@ -258,17 +258,22 @@
'unblocklink',
'change-blocklink',
);
- $msg = array_combine( $msg, array_map( array( $this,
'msg' ), $msg ) );
+
+ foreach ( $keys as $key ) {
+ $msg[$key] = $this->msg( $key )->escaped();
+ }
}
/** @var $row object */
$row = $this->mCurrentRow;
+ $language = $this->getLanguage();
+
$formatted = '';
switch ( $name ) {
case 'ipb_timestamp':
- $formatted =
$this->getLanguage()->userTimeAndDate( $value, $this->getUser() );
+ $formatted = htmlspecialchars(
$language->userTimeAndDate( $value, $this->getUser() ) );
break;
case 'ipb_target':
@@ -294,7 +299,10 @@
break;
case 'ipb_expiry':
- $formatted =
$this->getLanguage()->formatExpiry( $value, /* User preference timezone */true
);
+ $formatted = htmlspecialchars(
$language->formatExpiry(
+ $value,
+ /* User preference timezone */true
+ ) );
if ( $this->getUser()->isAllowed( 'block' ) ) {
if ( $row->ipb_auto ) {
$links[] = Linker::linkKnown(
@@ -317,7 +325,7 @@
'span',
array( 'class' =>
'mw-blocklist-actions' ),
$this->msg( 'parentheses'
)->rawParams(
-
$this->getLanguage()->pipeList( $links ) )->escaped()
+ $language->pipeList(
$links ) )->escaped()
);
}
break;
@@ -355,7 +363,7 @@
$properties[] =
$msg['blocklist-nousertalk'];
}
- $formatted = $this->getLanguage()->commaList(
$properties );
+ $formatted = $language->commaList( $properties
);
break;
default:
--
To view, visit https://gerrit.wikimedia.org/r/177978
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I38bd12613b4066c312635f9920a9e2d2002dbf6d
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits