r108008 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108007‎ | r108008 | r108009 >
Date:10:35, 4 January 2012
Author:hashar
Status:ok
Tags:
Comment:
JSTesting: escape message

Replaced call to wfMsg() by wfMsgHtml() just to be safe.
Per cr on r107919.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialJavaScriptTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialJavaScriptTest.php
@@ -37,16 +37,16 @@
3838
3939 // No framework specified
4040 if ( $par == '' ) {
41 - $out->setPagetitle( wfMsg( 'javascripttest' ) );
 41+ $out->setPagetitle( wfMsgHtml( 'javascripttest' ) );
4242 $summary = $this->wrapSummaryHtml(
43 - wfMsg( 'javascripttest-pagetext-noframework' ) . $this->getFrameworkListHtml(),
 43+ wfMsgHtml( 'javascripttest-pagetext-noframework' ) . $this->getFrameworkListHtml(),
4444 'noframework'
4545 );
4646 $out->addHtml( $summary );
4747
4848 // Matched! Display proper title and initialize the framework
4949 } elseif ( isset( self::$frameworks[$framework] ) ) {
50 - $out->setPagetitle( wfMsg( 'javascripttest-title', wfMsg( "javascripttest-$framework-name" ) ) );
 50+ $out->setPagetitle( wfMsgHtml( 'javascripttest-title', wfMsgHtml( "javascripttest-$framework-name" ) ) );
5151 $out->setSubtitle(
5252 wfMessage( 'javascripttest-backlink' )->rawParams( Linker::linkKnown( $this->getTitle() ) )->escaped()
5353 );
@@ -54,9 +54,9 @@
5555
5656 // Framework not found, display error
5757 } else {
58 - $out->setPagetitle( wfMsg( 'javascripttest' ) );
 58+ $out->setPagetitle( wfMsgHtml( 'javascripttest' ) );
5959 $summary = $this->wrapSummaryHtml( '<p class="error">'
60 - . wfMsg( 'javascripttest-pagetext-unknownframework', $par )
 60+ . wfMsgHtml( 'javascripttest-pagetext-unknownframework', $par )
6161 . '</p>'
6262 . $this->getFrameworkListHtml(),
6363 'unknownframework'
@@ -75,7 +75,7 @@
7676 $list .= Html::rawElement(
7777 'li',
7878 array(),
79 - Linker::link( $this->getTitle( $framework ), wfMsg( "javascripttest-$framework-name" ) )
 79+ Linker::link( $this->getTitle( $framework ), wfMsgHtml( "javascripttest-$framework-name" ) )
8080 );
8181 }
8282 $list .= '</ul>';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107919merge JSTesting branch into trunk...hashar18:33, 3 January 2012

Status & tagging log