Skip to content
Browse files

BUGFIX: In SSViewer::parseTemplateContent($content, $template=""), wh…

…en the $content is a xml template, we should not wrap anything around it, for web browser able to correct parse the xml

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@71923 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 0e2345c commit d4a1087cb8198d463be831f69b400ebb2360b238 Normann Lou committed with sminnee
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/SSViewer.php
View
2 core/SSViewer.php
@@ -369,7 +369,7 @@ public function process($item) {
static function parseTemplateContent($content, $template="") {
// Add template filename comments on dev sites
- if(Director::isDev() && self::$source_file_comments && $template) {
+ if(Director::isDev() && self::$source_file_comments && $template && stripos($content, "<?xml") === false) {
// 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, "<html") !== false) {
$content = preg_replace('/(<html[^>]*>)/i', "\\1<!-- template $template -->", $content);

0 comments on commit d4a1087

Please sign in to comment.
Something went wrong with that request. Please try again.