From: Brion Vibber Date: Wed, 20 Apr 2005 22:55:49 +0000 (+0000) Subject: * (bug 1188, bug 1936) Only run strip and sanitize on templates for X-Git-Tag: 1.5.0alpha1~221 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=8ac68932c753a6627830c0186ba0fbd87099fb52;p=lhc%2Fweb%2Fwiklou.git * (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 --- 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