From: Alexandre Emsenhuber Date: Sun, 5 Jun 2011 19:37:08 +0000 (+0000) Subject: Replace the text directly instead of using the StripState object since it will be... X-Git-Tag: 1.31.0-rc.0~29697 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=6582de54f39118a31228bb6c5ec8ad7df41d1a19;p=lhc%2Fweb%2Fwiklou.git Replace the text directly instead of using the StripState object since it will be unstripped just after the call replaceTransparentTags(), but left the call unstripGeneral() for the benefit of Poem extension that use it to escape the
tag --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 56b23efebb..ff0d9361be 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -5123,6 +5123,7 @@ class Parser { $matches = array(); $elements = array_keys( $this->mTransparentTagHooks ); $text = self::extractTagsAndParams( $elements, $text, $matches, $this->mUniqPrefix ); + $replacements = array(); foreach ( $matches as $marker => $data ) { list( $element, $content, $params, $tag ) = $data; @@ -5132,9 +5133,9 @@ class Parser { } else { $output = $tag; } - $this->mStripState->addGeneral( $marker, $output ); + $replacements[$marker] = $output; } - return $text; + return strtr( $text, $replacements ); } /**