From: Alexandre Emsenhuber Date: Fri, 11 Sep 2009 17:17:55 +0000 (+0000) Subject: Fix for r55535, per Brion's comment: convert x-coded strings in the target input... X-Git-Tag: 1.31.0-rc.0~39787 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=a7769a23d7ffdf1f9cd3b02d1a1f4862a97536de;p=lhc%2Fweb%2Fwiklou.git Fix for r55535, per Brion's comment: convert x-coded strings in the target input and escape it before pre-filling the box --- diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 0c92a8a43c..68ba065932 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -17,8 +17,10 @@ function wfSpecialMovepage( $par = null ) { } $target = isset( $par ) ? $par : $wgRequest->getVal( 'target' ); + + // Yes, the use of getVal() and getText() is wanted, see bug 20365 $oldTitleText = $wgRequest->getVal( 'wpOldTitle', $target ); - $newTitleText = $wgRequest->getVal( 'wpNewTitle' ); + $newTitleText = $wgRequest->getText( 'wpNewTitle' ); $oldTitle = Title::newFromText( $oldTitleText ); $newTitle = Title::newFromText( $newTitleText ); @@ -87,7 +89,7 @@ class MovePageForm { * OutputPage::wrapWikiMsg(). */ function showForm( $err ) { - global $wgOut, $wgUser, $wgFixDoubleRedirects; + global $wgOut, $wgUser, $wgContLang, $wgFixDoubleRedirects; $skin = $wgUser->getSkin(); @@ -200,7 +202,7 @@ class MovePageForm { Xml::label( wfMsg( 'newtitle' ), 'wpNewTitle' ) . " " . - Xml::input( 'wpNewTitle', 40, $newTitle->getPrefixedText(), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) . + Xml::input( 'wpNewTitle', 40, $wgContLang->recodeForEdit( $newTitle->getPrefixedText() ), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) . Xml::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) . "