'h2',
[ 'id' => 'metadata' ],
$this->getContext()->msg( 'metadata' )->text() ) . "\n" );
- $out->addWikiTextAsInterface( $this->makeMetadataTable( $formattedMetadata ) );
+ $out->wrapWikiTextAsInterface(
+ 'mw-imagepage-section-metadata',
+ $this->makeMetadataTable( $formattedMetadata )
+ );
$out->addModules( [ 'mediawiki.action.view.metadata' ] );
}
* @return string The metadata table. This is treated as Wikitext (!)
*/
protected function makeMetadataTable( $metadata ) {
- $r = "<div class=\"mw-imagepage-section-metadata\">";
- $r .= $this->getContext()->msg( 'metadata-help' )->plain();
+ $r = $this->getContext()->msg( 'metadata-help' )->plain();
// Intial state is collapsed
// see filepage.css and mediawiki.action.view.metadata module.
$r .= "<table id=\"mw_metadata\" class=\"mw_metadata collapsed\">\n";
);
}
}
- $r .= "</table>\n</div>\n";
+ $r .= "</table>\n";
return $r;
}