Merge "Fix return in Preprocessor::cacheSetTree"
[lhc/web/wiklou.git] / includes / actions / InfoAction.php
index baec944..c5cd89f 100644 (file)
@@ -153,11 +153,12 @@ class InfoAction extends FormlessAction {
         * Creates a header that can be added to the output.
         *
         * @param string $header The header text.
+        * @param string $canonicalId
         * @return string The HTML.
         */
        protected function makeHeader( $header, $canonicalId ) {
-               $spanAttribs = [ 'class' => 'mw-headline', 'id' => Sanitizer::escapeId( $header ) ];
-               $h2Attribs = [ 'id' => Sanitizer::escapeId( $canonicalId ) ];
+               $spanAttribs = [ 'class' => 'mw-headline', 'id' => Sanitizer::escapeIdForAttribute( $header ) ];
+               $h2Attribs = [ 'id' => Sanitizer::escapeIdForAttribute( $canonicalId ) ];
 
                return Html::rawElement( 'h2', $h2Attribs, Html::element( 'span', $spanAttribs, $header ) );
        }
@@ -848,7 +849,7 @@ class InfoAction extends FormlessAction {
                $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
 
                # Sift for real versus user names
-               /** @var $user User */
+               /** @var User $user */
                foreach ( $contributors as $user ) {
                        $page = $user->isAnon()
                                ? SpecialPage::getTitleFor( 'Contributions', $user->getName() )