A proposal for fix which allows also preparsing for
wikitext included in
templates (it works for me, but which you might want to review for inclusion
in the main code):
original code:
function replaceVariables( $text, $args = array(), $argsOnly = false ) {
... snip code for readability ...
wfProfileOut( $fname );
return $text;
}
replace this with:
function replaceVariables( $text, $args = array(), $argsOnly = false ) {
... snip code for readability ...
wfProfileOut( $fname );
wfRunHooks( 'ParserBeforeStrip', array( &$this, &$text,
&$this->mStripState ) );
return $text;
}
I think it should be a new hook, not calling the existing hook again.
Having the existing hook called multiple times for one page could
easily break extensions.