'ShowRawCssJs',
array( $this->mContentObject, $this->getTitle(), $outputPage ) )
) {
+ // If no legacy hooks ran, display the content of the parser output, including RL modules,
+ // but excluding metadata like categories and language links
$po = $this->mContentObject->getParserOutput( $this->getTitle() );
- $outputPage->addHTML( $po->getText() );
+ $outputPage->addParserOutputContent( $po );
}
}
}
// NOTE: only needed for B/C: custom rendering of JS/CSS via hook
if ( $this->mNewPage->isCssJsSubpage() || $this->mNewPage->isCssOrJsPage() ) {
- // Stolen from Article::view --AG 2007-10-11
+ // This needs to be synchronised with Article::showCssOrJsPage(), which sucks
// Give hooks a chance to customise the output
// @todo standardize this crap into one function
if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
// use the content object's own rendering
$cnt = $this->mNewRev->getContent();
$po = $cnt ? $cnt->getParserOutput( $this->mNewRev->getTitle(), $this->mNewRev->getId() ) : null;
- $txt = $po ? $po->getText() : '';
- $out->addHTML( $txt );
+ if ( $po ) {
+ $out->addParserOutputContent( $po );
+ }
}
} elseif ( !wfRunHooks( 'ArticleContentViewCustom', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
// Handled by extension