* Escaping the title
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 7 May 2007 18:01:11 +0000 (18:01 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 7 May 2007 18:01:11 +0000 (18:01 +0000)
includes/SpecialCategories.php

index 7191fe9..fd3a51e 100644 (file)
@@ -53,11 +53,10 @@ class CategoryPager extends AlphabeticPager {
        function formatRow($result) {
                global $wgLang;
                $title = Title::makeTitle( NS_CATEGORY, $result->cl_to );
-               return Xml::tags('li', null,
-                       $this->getSkin()->makeLinkObj( $title, $title->getText() ) . ' (' .
-                       wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
-                               $wgLang->formatNum( $result->count ) ) . ')'
-                       ) . "\n";
+               $titleText = $this->getSkin()->makeLinkObj( $title, htmlspecialchars( $title->getText() ) );
+               $count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
+                               $wgLang->formatNum( $result->count ) );
+               return Xml::tags('li', null, "$titleText ($count)" ) . "\n";
        }
 }