}
if ( $this->fld_content && !$revision->isDeleted( Revision::DELETED_TEXT ) ) {
if ( $this->generateXML ) {
- $wgParser->startExternalParse( $title, new ParserOptions(), OT_PREPROCESS );
+ $wgParser->startExternalParse( $title, ParserOptions::newFromContext( $this->getContext() ), OT_PREPROCESS );
$dom = $wgParser->preprocessToDom( $text );
if ( is_callable( array( $dom, 'saveXML' ) ) ) {
$xml = $dom->saveXML();
}
if ( $this->expandTemplates && !$this->parseContent ) {
- $text = $wgParser->preprocess( $text, $title, new ParserOptions() );
+ $text = $wgParser->preprocess( $text, $title, ParserOptions::newFromContext( $this->getContext() ) );
}
if ( $this->parseContent ) {
- $text = $wgParser->parse( $text, $title, new ParserOptions() )->getText();
+ $text = $wgParser->parse( $text, $title, ParserOptions::newFromContext( $this->getContext() ) )->getText();
}
ApiResult::setContent( $vals, $text );
} elseif ( $this->fld_content ) {