bug fixes:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 28 Apr 2008 18:00:58 +0000 (18:00 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 28 Apr 2008 18:00:58 +0000 (18:00 +0000)
* Be sure that article name is escaped when outputing a redirect page
* Mark Xml::buildForm() as static

includes/Article.php
includes/Xml.php

index 55bca1b..6b141b3 100644 (file)
@@ -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( '<img src="'.$imageUrl.'" alt="#REDIRECT " />' .
                                  '<span class="redirectText">'.$link.'</span>' );
index 3fe3cb5..d72f49d 100644 (file)
@@ -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 .= "<table><tbody>";
        
@@ -545,7 +545,7 @@ class Xml {
        
                $form .= "</tbody></table>";
        
-               $form .= wfSubmitButton( wfMsg($submitLabel) );
+               $form .= Xml::submitButton( wfMsg($submitLabel) );
        
                return $form;
        }