Jackmcbarn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/188945

Change subject: Properly escape the messages in CategoryViewer.php
......................................................................

Properly escape the messages in CategoryViewer.php

This mostly reverts commit 8fe8035da20d0f5861b51f196c7443dda06301ba,
and redoes it without escaping the parser output.

Change-Id: I87da10e63b55c1a6c83dd497e30f65ad224e052b
(cherry picked from commit 98cdb56c724a2aa52af5e104f31ac7ba2906dc89)
---
M includes/CategoryViewer.php
1 file changed, 6 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/188945/1

diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index c898ec9..6b86853 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -387,16 +387,13 @@
 
                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 .= "<div id=\"mw-subcategories\">\n";
+                       $r .= '<h2>' . $this->msg( 'subcategories' )->parse() . 
"</h2>\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</div>";
                }
                return $r;
        }
@@ -419,16 +416,13 @@
                $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 = "<div id=\"mw-pages\">\n";
+                       $r .= '<h2>' . $this->msg( 'category_header', $ti 
)->parse() . "</h2>\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</div>";
                }
                return $r;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/188945
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87da10e63b55c1a6c83dd497e30f65ad224e052b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf16
Gerrit-Owner: Jackmcbarn <jackmcb...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to