Skip to content

Commit

Permalink
BUGFIX More specific regex in Requirements->includeInHTML() to avoid …
Browse files Browse the repository at this point in the history
…duplicating information by matching HTML5-style <header> tags instead of <head> (fixes #5640) (from r105667)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112500 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Oct 15, 2010
1 parent cf4a722 commit 9c68b95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/Requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,10 @@ function includeInHTML($templateFile, $content) {
}

// Put CSS at the bottom of the head
$content = preg_replace("/(<\/head[^>]*>)/i", $requirements . "\\1", $content);
$content = preg_replace("/(<\/head>)/i", $requirements . "\\1", $content);
} else {
$content = preg_replace("/(<\/head[^>]*>)/i", $requirements . "\\1", $content);
$content = preg_replace("/(<\/head[^>]*>)/i", $jsRequirements . "\\1", $content);
$content = preg_replace("/(<\/head>)/i", $requirements . "\\1", $content);
$content = preg_replace("/(<\/head>)/i", $jsRequirements . "\\1", $content);
}
}

Expand Down

0 comments on commit 9c68b95

Please sign in to comment.