From 8ac68932c753a6627830c0186ba0fbd87099fb52 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 20 Apr 2005 22:55:49 +0000 Subject: [PATCH] * (bug 1188, bug 1936) Only run strip and sanitize on templates for final output, not on save-time subst: transformations. Fixes tests: Running test pre-save transform: nowiki in subst (bug 1188)... PASSED Running test pre-save transform: comment in subst (bug 1936)... PASSED --- includes/Parser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 7325323a02..784b4a8021 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2148,8 +2148,10 @@ class Parser # Add a new element to the templace recursion path $this->mTemplatePath[$part1] = 1; - $text = $this->strip( $text, $this->mStripState ); - $text = Sanitizer::removeHTMLtags( $text ); + if( $this->mOutputType == OT_HTML ) { + $text = $this->strip( $text, $this->mStripState ); + $text = Sanitizer::removeHTMLtags( $text ); + } $text = $this->replaceVariables( $text, $assocArgs ); # Resume the link cache and register the inclusion as a link -- 2.20.1