jenkins-bot has submitted this change and it was merged.
Change subject: Escape unescaped messages in Special:Preferences
......................................................................
Escape unescaped messages in Special:Preferences
Bug: T85864
Change-Id: Ie516549bce72a0052570ab38bde4c03e2bc1b69b
---
M includes/Preferences.php
1 file changed, 16 insertions(+), 18 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
Nemo bis: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/includes/Preferences.php b/includes/Preferences.php
index aca6dcb..9e0a255 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -243,10 +243,9 @@
'type' => 'info',
'label' => $context->msg( 'prefs-memberingroups'
)->numParams(
count( $userGroups ) )->params( $userName
)->parse(),
- 'default' => $context->msg( 'prefs-memberingroups-type',
- $lang->commaList( $userGroups ),
- $lang->commaList( $userMembers )
- )->plain(),
+ 'default' => $context->msg( 'prefs-memberingroups-type'
)
+ ->rawParams( $lang->commaList( $userGroups ),
$lang->commaList( $userMembers ) )
+ ->escaped(),
'raw' => true,
'section' => 'personal/info',
);
@@ -338,11 +337,11 @@
'type' => 'radio',
'section' => 'personal/i18n',
'options' => array(
- $context->msg( 'parentheses',
- $context->msg( 'gender-unknown'
)->text()
- )->text() => 'unknown',
- $context->msg( 'gender-female' )->text() =>
'female',
- $context->msg( 'gender-male' )->text() =>
'male',
+ $context->msg( 'parentheses' )
+ ->params( $context->msg(
'gender-unknown' )->plain() )
+ ->escaped() => 'unknown',
+ $context->msg( 'gender-female' )->escaped() =>
'female',
+ $context->msg( 'gender-male' )->escaped() =>
'male',
),
'label-message' => 'yourgender',
'help-message' => 'prefs-help-gender',
@@ -450,8 +449,8 @@
array( 'returnto' =>
SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText() ) );
$emailAddress .= $emailAddress == '' ?
$link : (
- $context->msg( 'word-separator'
)->plain()
- . $context->msg( 'parentheses'
)->rawParams( $link )->plain()
+ $context->msg( 'word-separator'
)->escaped()
+ . $context->msg( 'parentheses'
)->rawParams( $link )->escaped()
);
}
@@ -869,7 +868,7 @@
'min' => 1,
'max' => ceil( $rcMaxAge / ( 3600 * 24 ) ),
'help' => $context->msg( 'recentchangesdays-max'
)->numParams(
- ceil( $rcMaxAge / ( 3600 * 24 ) ) )->text()
+ ceil( $rcMaxAge / ( 3600 * 24 ) ) )->escaped()
);
$defaultPreferences['rclimit'] = array(
'type' => 'int',
@@ -926,7 +925,7 @@
'max' => $watchlistdaysMax,
'section' => 'watchlist/displaywatchlist',
'help' => $context->msg( 'prefs-watchlist-days-max'
)->numParams(
- $watchlistdaysMax )->text(),
+ $watchlistdaysMax )->escaped(),
'label-message' => 'prefs-watchlist-days',
);
$defaultPreferences['wllimit'] = array(
@@ -1046,7 +1045,7 @@
$ret = array();
$mptitle = Title::newMainPage();
- $previewtext = $context->msg( 'skin-preview' )->text();
+ $previewtext = $context->msg( 'skin-preview' )->escaped();
# Only show skins that aren't disabled in $wgSkipSkins
$validSkinNames = Skin::getAllowedSkins();
@@ -1091,10 +1090,9 @@
$linkTools[] = Linker::link( $jsPage,
$context->msg( 'prefs-custom-js' )->escaped() );
}
- $display = $sn . ' ' . $context->msg(
- 'parentheses',
- $context->getLanguage()->pipeList( $linkTools )
- )->text();
+ $display = $sn . ' ' . $context->msg( 'parentheses' )
+ ->rawParams( $context->getLanguage()->pipeList(
$linkTools ) )
+ ->escaped();
$ret[$display] = $skinkey;
}
--
To view, visit https://gerrit.wikimedia.org/r/183004
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie516549bce72a0052570ab38bde4c03e2bc1b69b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Unicodesnowman <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits