r96433 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96432‎ | r96433 | r96434 >
Date:13:52, 7 September 2011
Author:siebrand
Status:resolved (Comments)
Tags:
Comment:
Follow-up r96429: use wfMessage() to make it work properly. Previously $userToolLinks was escaped.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -447,7 +447,7 @@
448448 Html::hidden( 'wpEditToken', $this->getUser()->editToken( $this->mTarget ) ) .
449449 Xml::openElement( 'fieldset' ) .
450450 Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) .
451 - wfMsgExt( 'editinguser', array( 'parse' ), wfEscapeWikiText( $user->getName() ), $userToolLinks ) .
 451+ wfMessage( 'editinguser' )->params( wfEscapeWikiText( $user->getName() ) )->rawParams( $userToolLinks ) .
452452 wfMsgExt( 'userrights-groups-help', array( 'parse' ) ) .
453453 $grouplist .
454454 Xml::tags( 'p', null, $this->groupCheckboxes( $groups ) ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r96452Follow-up CR comment by Nikerabbit on r96433: Do not rely on implicit convers...siebrand17:11, 7 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96429Add "send e-mail" link on Special:Userrights and replace the "manual" tool li...siebrand13:30, 7 September 2011

Comments

#Comment by Nikerabbit (talk | contribs)   14:44, 7 September 2011

You probably want to add ->text() after rawParams(). Now you are relying on implicit conversion of message object to string, which defaults to full wikitext parsing.

Status & tagging log