From 0e2345c253f10982fc5f733fb937d93526b553c6 Mon Sep 17 00:00:00 2001 From: Normann Lou Date: Tue, 17 Feb 2009 01:19:45 +0000 Subject: [PATCH] Undo the change committed in r71918 since the commit message is missing git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@71921 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/SSViewer.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/core/SSViewer.php b/core/SSViewer.php index f469eba0f..5216300b0 100644 --- a/core/SSViewer.php +++ b/core/SSViewer.php @@ -368,17 +368,14 @@ class SSViewer extends Object { static function parseTemplateContent($content, $template="") { // Add template filename comments on dev sites - - // 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"; - } + + 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"; } }