r56188 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56187‎ | r56188 | r56189 >
Date:17:17, 11 September 2009
Author:ialex
Status:ok
Tags:
Comment:
Fix for r55535, per Brion's comment: convert x-coded strings in the target input and escape it before pre-filling the box
Modified paths:
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -17,8 +17,10 @@
1818 }
1919
2020 $target = isset( $par ) ? $par : $wgRequest->getVal( 'target' );
 21+
 22+ // Yes, the use of getVal() and getText() is wanted, see bug 20365
2123 $oldTitleText = $wgRequest->getVal( 'wpOldTitle', $target );
22 - $newTitleText = $wgRequest->getVal( 'wpNewTitle' );
 24+ $newTitleText = $wgRequest->getText( 'wpNewTitle' );
2325
2426 $oldTitle = Title::newFromText( $oldTitleText );
2527 $newTitle = Title::newFromText( $newTitleText );
@@ -87,7 +89,7 @@
8890 * OutputPage::wrapWikiMsg().
8991 */
9092 function showForm( $err ) {
91 - global $wgOut, $wgUser, $wgFixDoubleRedirects;
 93+ global $wgOut, $wgUser, $wgContLang, $wgFixDoubleRedirects;
9294
9395 $skin = $wgUser->getSkin();
9496
@@ -200,7 +202,7 @@
201203 Xml::label( wfMsg( 'newtitle' ), 'wpNewTitle' ) .
202204 "</td>
203205 <td class='mw-input'>" .
204 - Xml::input( 'wpNewTitle', 40, $newTitle->getPrefixedText(), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) .
 206+ Xml::input( 'wpNewTitle', 40, $wgContLang->recodeForEdit( $newTitle->getPrefixedText() ), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) .
205207 Xml::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
206208 "</td>
207209 </tr>

Follow-up revisions

RevisionCommit summaryAuthorDate
r56384merge r56188brion18:37, 15 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55535* (bug 20365) Page name with with c/g/h/j/s/u + x are now correctly handled i...ialex20:19, 23 August 2009

Status & tagging log