diff --git a/HeaderFooter.class.php b/HeaderFooter.class.php index 611e348..2303822 100644 --- a/HeaderFooter.class.php +++ b/HeaderFooter.class.php @@ -19,7 +19,9 @@ public static function hOutputPageParserOutput( &$op, $parserOutput ) { $ns = $wgTitle->getNsText(); $name = $wgTitle->getPrefixedDBKey(); - $text = $parserOutput->getText(); + // Get output markup omitting the `mw-parser-output` wrapper + // because the wrapper will be added later by $parserOutput->setText + $text = $parserOutput->getText( [ 'wrapperDivClass' => '' ] ); $nsheader = self::conditionalInclude( $text, '__NONSHEADER__', 'hf-nsheader', $ns ); $header = self::conditionalInclude( $text, '__NOHEADER__', 'hf-header', $name );