From: Alexandre Emsenhuber Date: Mon, 28 Apr 2008 18:00:58 +0000 (+0000) Subject: bug fixes: X-Git-Tag: 1.31.0-rc.0~48024 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=5cf24493fa7859aff0b2a867a7db6434d19ebc14;p=lhc%2Fweb%2Fwiklou.git bug fixes: * Be sure that article name is escaped when outputing a redirect page * Mark Xml::buildForm() as static --- diff --git a/includes/Article.php b/includes/Article.php index 55bca1b952..6b141b3f32 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -862,7 +862,7 @@ class Article { if( !$wasRedirected && $this->isCurrent() ) { $wgOut->setSubtitle( wfMsgHtml( 'redirectpagesub' ) ); } - $link = $sk->makeLinkObj( $rt, $rt->getFullText() ); + $link = $sk->makeLinkObj( $rt, htmlspecialchars( $rt->getFullText() ) ); $wgOut->addHTML( '#REDIRECT ' . ''.$link.'' ); diff --git a/includes/Xml.php b/includes/Xml.php index 3fe3cb509f..d72f49d9b5 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -528,7 +528,7 @@ class Xml { * @param string $submitLabel A message containing a label for the submit button. * @return string HTML form. */ - function buildForm( $fields, $submitLabel ) { + public static function buildForm( $fields, $submitLabel ) { $form = ''; $form .= ""; @@ -545,7 +545,7 @@ class Xml { $form .= "
"; - $form .= wfSubmitButton( wfMsg($submitLabel) ); + $form .= Xml::submitButton( wfMsg($submitLabel) ); return $form; }