Index: trunk/phase3/includes/Parser.php |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | var $mTagHooks; |
101 | 101 | |
102 | 102 | # Cleared with clearState(): |
103 | | - var $mOutput, $mAutonumber, $mDTopen, $mStripState = array(); |
| 103 | + var $mOutput, $mAutonumber, $mDTopen, $mStripState = array(), $mCurrentParams = array(); |
104 | 104 | var $mVariables, $mIncludeCount, $mArgStack, $mLastSection, $mInPre; |
105 | 105 | var $mInterwikiLinkHolders, $mLinkHolders; |
106 | 106 | |
— | — | @@ -141,6 +141,7 @@ |
142 | 142 | $this->mStripState = array(); |
143 | 143 | $this->mArgStack = array(); |
144 | 144 | $this->mInPre = false; |
| 145 | + $this->mCurrentParams = array(); |
145 | 146 | $this->mInterwikiLinkHolders = array( |
146 | 147 | 'texts' => array(), |
147 | 148 | 'titles' => array() |
— | — | @@ -422,6 +423,7 @@ |
423 | 424 | $text = Parser::extractTagsAndParams( $tag, $text, $ext_content[$tag], |
424 | 425 | $ext_tags[$tag], $ext_params[$tag], $uniq_prefix ); |
425 | 426 | foreach( $ext_content[$tag] as $marker => $content ) { |
| 427 | + $content = $this->replaceVariables( $content, $this->mCurrentParams ); |
426 | 428 | $full_tag = $ext_tags[$tag][$marker]; |
427 | 429 | $params = $ext_params[$tag][$marker]; |
428 | 430 | if ( $render ) { |
— | — | @@ -2301,6 +2303,7 @@ |
2302 | 2304 | $text = preg_replace( '/<noinclude>.*?<\/noinclude>/s', '', $text ); |
2303 | 2305 | $text = strtr( $text, array( '<includeonly>' => '' , '</includeonly>' => '' ) ); |
2304 | 2306 | # Strip <nowiki>, <pre>, etc. |
| 2307 | + $this->mCurrentParams = $assocArgs; |
2305 | 2308 | $text = $this->strip( $text, $this->mStripState ); |
2306 | 2309 | $text = Sanitizer::removeHTMLtags( $text, array( &$this, 'replaceVariables' ), $assocArgs ); |
2307 | 2310 | } |