From 6582de54f39118a31228bb6c5ec8ad7df41d1a19 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 5 Jun 2011 19:37:08 +0000 Subject: [PATCH] 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 --- includes/parser/Parser.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ); } /** -- 2.20.1