diff --git a/core/SSViewer.php b/core/SSViewer.php index 5216300b0..f469eba0f 100644 --- a/core/SSViewer.php +++ b/core/SSViewer.php @@ -368,14 +368,17 @@ class SSViewer extends Object { static function parseTemplateContent($content, $template="") { // Add template filename comments on dev sites - - if(Director::isDev() && self::$source_file_comments && $template) { - // If this template is a full HTML page, then put the comments just inside the HTML tag to prevent any IE glitches - if(stripos($content, "]*>)/i', "\\1", $content); - $content = preg_replace('/(<\/html[^>]*>)/i', "\\1", $content); - } else { - $content = "\n" . $content . "\n"; + + // If the template is a xml template, then wrapping nothing. + if(stripos($content, "]*>)/i', "\\1", $content); + $content = preg_replace('/(<\/html[^>]*>)/i', "\\1", $content); + } else { + $content = "\n" . $content . "\n"; + } } }