* Be sure that article name is escaped when outputing a redirect page
* Mark Xml::buildForm() as static
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>' );
* @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>";
$form .= "</tbody></table>";
- $form .= wfSubmitButton( wfMsg($submitLabel) );
+ $form .= Xml::submitButton( wfMsg($submitLabel) );
return $form;
}