From a7769a23d7ffdf1f9cd3b02d1a1f4862a97536de Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 11 Sep 2009 17:17:55 +0000 Subject: [PATCH] Fix for r55535, per Brion's comment: convert x-coded strings in the target input and escape it before pre-filling the box --- includes/specials/SpecialMovepage.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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() ) . " -- 2.20.1