* (bug 1188, bug 1936) Only run strip and sanitize on templates for
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 20 Apr 2005 22:55:49 +0000 (22:55 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 20 Apr 2005 22:55:49 +0000 (22:55 +0000)
  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

index 7325323..784b4a8 100644 (file)
@@ -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