//$text = $this->strip( $text, $this->mStripState );
// VOODOO MAGIC FIX! Sometimes the above segfaults in PHP5.
$x =& $this->mStripState;
+
+ wfRunHooks( 'ParserBeforeStrip', array( &$this, &$text, &$x ) );
$text = $this->strip( $text, $x );
+ wfRunHooks( 'ParserAfterStrip', array( &$this, &$text, &$x ) );
$text = $this->internalParse( $text );
-
$text = $this->unstrip( $text, $this->mStripState );
# Clean up special characters, only run once, next-to-last before doBlockLevels
$this->mOutput->setTitleText($wgContLang->getParsedTitle());
$text = $this->unstripNoWiki( $text, $this->mStripState );
+
+ wfRunHooks( 'ParserBeforeTidy', array( &$this, &$text ) );
$text = Sanitizer::normalizeCharReferences( $text );
global $wgUseTidy;
$text = Parser::tidy($text);
}
+ wfRunHooks( 'ParserAfterTidy', array( &$this, &$text ) );
+
$this->mOutput->setText( $text );
wfProfileOut( $fname );
return $this->mOutput;
'html' => array(),
'nowiki' => array(),
'math' => array(),
- 'pre' => array()
+ 'pre' => array(),
+ 'comment' => array(),
+ 'gallery' => array(),
);
}
$state['item'][$rnd] = $text;