From 5cf24493fa7859aff0b2a867a7db6434d19ebc14 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 28 Apr 2008 18:00:58 +0000 Subject: [PATCH] bug fixes: * Be sure that article name is escaped when outputing a redirect page * Mark Xml::buildForm() as static --- includes/Article.php | 2 +- includes/Xml.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.20.1