mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 23:50:30 +00:00
Explicitly format Message oject instead of string cast
The implicit in Mesage::__toString, as called when the object is accepted by a method that needs a string, is to format with parse(). Call that explicitly instead, or use escaped() in places where it seems like elaborate wikitext isn't expected. Change-Id: I9f1de3a0047d1f26d30c8607a0a79543d166176f
This commit is contained in:
parent
6693267e57
commit
4f269d67b8
|
@ -163,7 +163,7 @@ class ToolbarBuilder {
|
|||
|
||||
$entry = new SingleMenuEntry(
|
||||
'page-actions-contributions',
|
||||
$label,
|
||||
$label->escaped(),
|
||||
SpecialPage::getTitleFor( 'Contributions', $user->getName() )->getLocalURL() );
|
||||
$entry->setTitle( $label )
|
||||
->trackClicks( 'contributions' )
|
||||
|
@ -199,7 +199,7 @@ class ToolbarBuilder {
|
|||
|
||||
$entry = new SingleMenuEntry(
|
||||
'page-actions-edit',
|
||||
$this->messageLocalizer->msg( 'mobile-frontend-editor-edit' ),
|
||||
$this->messageLocalizer->msg( 'mobile-frontend-editor-edit' )->escaped(),
|
||||
$title->getLocalURL( $editArgs ),
|
||||
'edit-page'
|
||||
);
|
||||
|
|
|
@ -175,7 +175,7 @@ class MinervaHooks {
|
|||
$enhanced = $request->getBool( 'enhanced', $isEnhancedDefaultForUser );
|
||||
if ( $enhanced ) {
|
||||
$out->addHTML( Html::warningBox(
|
||||
$special->msg( 'skin-minerva-recentchanges-warning-enhanced-not-supported' )
|
||||
$special->msg( 'skin-minerva-recentchanges-warning-enhanced-not-supported' )->parse()
|
||||
) );
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -257,7 +257,7 @@ class MinervaTemplate extends BaseTemplate {
|
|||
'class' => MinervaUI::iconClass(
|
||||
'search-base20', 'element', 'skin-minerva-search-trigger', 'wikimedia'
|
||||
)
|
||||
], wfMessage( 'searchbutton' ) ),
|
||||
], wfMessage( 'searchbutton' )->escaped() ),
|
||||
'userNotificationsHTML' => $data['userNotificationsHTML'] ?? '',
|
||||
'data-main-menu' => $this->getMainMenuData( $data ),
|
||||
'hasheadingholder' => $hasHeadingHolder,
|
||||
|
|
Loading…
Reference in a new issue