From 8672b72a19de46102e635f0f59e1bb91c55c517a Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Thu, 13 Oct 2005 12:58:14 +0000 Subject: [PATCH] ported fix for bug 2257 here --- includes/Parser.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 8c50a4f251..7736b04d76 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -99,7 +99,7 @@ class Parser var $mTagHooks; # Cleared with clearState(): - var $mOutput, $mAutonumber, $mDTopen, $mStripState = array(); + var $mOutput, $mAutonumber, $mDTopen, $mStripState = array(), $mCurrentParams = array(); var $mVariables, $mIncludeCount, $mArgStack, $mLastSection, $mInPre; var $mInterwikiLinkHolders, $mLinkHolders; @@ -141,6 +141,7 @@ class Parser $this->mStripState = array(); $this->mArgStack = array(); $this->mInPre = false; + $this->mCurrentParams = array(); $this->mInterwikiLinkHolders = array( 'texts' => array(), 'titles' => array() @@ -422,6 +423,7 @@ class Parser $text = Parser::extractTagsAndParams( $tag, $text, $ext_content[$tag], $ext_tags[$tag], $ext_params[$tag], $uniq_prefix ); foreach( $ext_content[$tag] as $marker => $content ) { + $content = $this->replaceVariables( $content, $this->mCurrentParams ); $full_tag = $ext_tags[$tag][$marker]; $params = $ext_params[$tag][$marker]; if ( $render ) { @@ -2301,6 +2303,7 @@ class Parser $text = preg_replace( '/.*?<\/noinclude>/s', '', $text ); $text = strtr( $text, array( '' => '' , '' => '' ) ); # Strip ,
, etc.
+				$this->mCurrentParams = $assocArgs;
 				$text = $this->strip( $text, $this->mStripState );
 				$text = Sanitizer::removeHTMLtags( $text, array( &$this, 'replaceVariables' ), $assocArgs );
 			}
-- 
2.20.1