From: Jens Frank Date: Fri, 17 Sep 2004 06:15:12 +0000 (+0000) Subject: BUG#60 Patch by Wil Mahan X-Git-Tag: 1.5.0alpha1~1991 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=55e61144996fcb8432d6ebd250c6c3e83008d06f;p=lhc%2Fweb%2Fwiklou.git BUG#60 Patch by Wil Mahan Include templates instead of parsing them. Than, parse the whole wikitext in one step --- diff --git a/includes/Parser.php b/includes/Parser.php index 4bb512ad7d..30eb6b5596 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -570,14 +570,6 @@ class Parser return $t ; } - # Parses the text and adds the result to the strip state - # Returns the strip tag - function stripParse( $text, $newline, $args ) { - $text = $this->strip( $text, $this->mStripState ); - $text = $this->internalParse( $text, (bool)$newline, $args, false ); - return $newline.$this->insertStripItem( $text, $this->mStripState ); - } - function internalParse( $text, $linestart, $args = array(), $isMain=true ) { global $wgLang; @@ -1705,7 +1697,8 @@ class Parser # Add a new element to the templace recursion path $this->mTemplatePath[$part1] = 1; - $text = $this->stripParse( $text, $newline, $assocArgs ); + $text = $this->removeHTMLtags( $text ); + $text = $this->replaceVariables( $text, $assocArgs ); # Resume the link cache and register the inclusion as a link if ( !is_null( $title ) ) { @@ -1732,7 +1725,8 @@ class Parser $inputArgs = end( $this->mArgStack ); if ( array_key_exists( $arg, $inputArgs ) ) { - $text = $this->stripParse( $inputArgs[$arg], $newline, array() ); + $text = $this->removeHTMLtags( $inputArgs[$arg] ); + $text = $this->replaceVariables( $text, array() ); } return $text;