r96241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96240‎ | r96241 | r96242 >
Date:17:59, 4 September 2011
Author:platonides
Status:deferred (Comments)
Tags:
Comment:
Change some raw messages to escape html
Modified paths:
  • /trunk/extensions/OpenID/OpenID.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenID/OpenID.hooks.php
@@ -140,14 +140,14 @@
141141 foreach ( $urls as $url ) {
142142 $rows .= Xml::tags( 'tr', array(),
143143 Xml::tags( 'td', array(), Xml::element( 'a', array( 'href' => $url ), $url ) ) .
144 - Xml::tags( 'td', array(), $sk->link( $delTitle, wfMsg( 'openid-urls-delete' ), array(), array( 'url' => $url ) ) )
 144+ Xml::tags( 'td', array(), $sk->link( $delTitle, wfMsgHtml( 'openid-urls-delete' ), array(), array( 'url' => $url ) ) )
145145 ) . "\n";
146146 }
147147 $info = Xml::tags( 'table', array( 'class' => 'wikitable' ),
148148 Xml::tags( 'tr', array(), Xml::element( 'th', array(), wfMsg( 'openid-urls-url' ) ) . Xml::element( 'th', array(), wfMsg( 'openid-urls-action' ) ) ) . "\n" .
149149 $rows
150150 );
151 - $info .= $user->getSkin()->link( SpecialPage::getTitleFor( 'OpenIDConvert' ), wfMsgHtml( 'openid-add-url' ) );
 151+ $info .= $sk->link( SpecialPage::getTitleFor( 'OpenIDConvert' ), wfMsgHtml( 'openid-add-url' ) );
152152 return $info;
153153 }
154154
@@ -244,7 +244,7 @@
245245 $dbw = wfGetDB( DB_MASTER );
246246
247247 $dbw->delete( 'user_openid', array( 'uoi_user' => $userID ) );
248 - $wgOut->addHTML( "OpenID " . wfMsg( 'usermerge-userdeleted', $username, $userID ) );
 248+ $wgOut->addHTML( "OpenID " . wfMsgHtml( 'usermerge-userdeleted', $username, $userID ) );
249249
250250 wfDebug( "OpenID: deleted OpenID user $username ($userID)\n" );
251251
@@ -269,13 +269,13 @@
270270 $dbw = wfGetDB( DB_MASTER );
271271
272272 $dbw->update( 'user_openid', array( 'uoi_user' => $toUserID ), array( 'uoi_user' => $fromUserID ) );
273 - $wgOut->addHTML( "OpenID " . wfMsg( 'usermerge-updating', 'user_openid', $fromUsername, $toUsername ) . "<br />\n" );
 273+ $wgOut->addHTML( "OpenID " . wfMsgHtml( 'usermerge-updating', 'user_openid', $fromUsername, $toUsername ) . "<br />\n" );
274274
275275 wfDebug( "OpenID: transferred OpenID(s) of $fromUsername ($fromUserID) => $toUsername ($toUserID)\n" );
276276
277277 } else {
278278
279 - $wgOut->addHTML( wfMsg( 'openid-openids-were-not-merged' ) . "<br />\n" );
 279+ $wgOut->addHTML( wfMsgHtml( 'openid-openids-were-not-merged' ) . "<br />\n" );
280280 wfDebug( "OpenID: OpenID(s) were not merged for merged users $fromUsername ($fromUserID) => $toUsername ($toUserID)\n" );
281281
282282 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r96282wfMsgHtml doesn't escape parameters...platonides15:40, 5 September 2011

Comments

#Comment by Nikerabbit (talk | contribs)   18:09, 4 September 2011

wfMsgHtml doesn't escape parameters.

#Comment by Siebrand (talk | contribs)   18:43, 4 September 2011

Iirc you changed a few of these to use addWikiMsg or something similar instead of addHTML( wfMsg( )?

Status & tagging log