From 55e61144996fcb8432d6ebd250c6c3e83008d06f Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Fri, 17 Sep 2004 06:15:12 +0000 Subject: [PATCH] BUG#60 Patch by Wil Mahan Include templates instead of parsing them. Than, parse the whole wikitext in one step --- includes/Parser.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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; -- 2.20.1