From: Jackmcbarn Date: Thu, 5 Feb 2015 21:38:02 +0000 (+0000) Subject: Properly escape the messages in CategoryViewer.php X-Git-Tag: 1.31.0-rc.0~12497^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=98cdb56c724a2aa52af5e104f31ac7ba2906dc89;p=lhc%2Fweb%2Fwiklou.git Properly escape the messages in CategoryViewer.php This mostly reverts commit 8fe8035da20d0f5861b51f196c7443dda06301ba, and redoes it without escaping the parser output. Change-Id: I87da10e63b55c1a6c83dd497e30f65ad224e052b --- diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index c898ec975e..6b86853e51 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -387,16 +387,13 @@ class CategoryViewer extends ContextSource { if ( $rescnt > 0 ) { # Showing subcategories - $r .= Html::openElement( 'div', array( 'id' => 'mw-subcategories' ) ); - $r .= "\n"; - $r .= Html::element( 'h2', array(), $this->msg( 'subcategories' )->text() ); - $r .= "\n"; + $r .= "
\n"; + $r .= '

' . $this->msg( 'subcategories' )->parse() . "

\n"; $r .= $countmsg; $r .= $this->getSectionPagingLinks( 'subcat' ); $r .= $this->formatList( $this->children, $this->children_start_char ); $r .= $this->getSectionPagingLinks( 'subcat' ); - $r .= "\n"; - $r .= Html::closeElement( 'div' ); + $r .= "\n
"; } return $r; } @@ -419,16 +416,13 @@ class CategoryViewer extends ContextSource { $countmsg = $this->getCountMessage( $rescnt, $dbcnt, 'article' ); if ( $rescnt > 0 ) { - $r .= Html::openElement( 'div', array( 'id' => 'mw-pages' ) ); - $r .= "\n"; - $r .= Html::element( 'h2', array(), $this->msg( 'category_header', $ti )->text() ); - $r .= "\n"; + $r = "
\n"; + $r .= '

' . $this->msg( 'category_header', $ti )->parse() . "

\n"; $r .= $countmsg; $r .= $this->getSectionPagingLinks( 'page' ); $r .= $this->formatList( $this->articles, $this->articles_start_char ); $r .= $this->getSectionPagingLinks( 'page' ); - $r .= "\n"; - $r .= Html::closeElement( 'div' ); + $r .= "\n
"; } return $r; }