Skip to content

Commit

Permalink
Merge pull request #2120 from mikezilla/develop
Browse files Browse the repository at this point in the history
Fix MSIE conditionals regex in minify output
  • Loading branch information
narfbg committed Jan 6, 2013
2 parents 828f4c9 + 4d02e35 commit 85adeed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/core/Output.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ public function minify($output, $type = 'text/html')
$output = preg_replace('!\s{2,}!', ' ', $output); $output = preg_replace('!\s{2,}!', ' ', $output);


// Remove comments (non-MSIE conditionals) // Remove comments (non-MSIE conditionals)
$output = preg_replace('{\s*<!--[^\[].*-->\s*}msU', '', $output); $output = preg_replace('{\s*<!--[^\[<>].*(?<!!)-->\s*}msU', '', $output);


// Remove spaces around block-level elements. // Remove spaces around block-level elements.
$output = preg_replace('/\s*(<\/?(html|head|title|meta|script|link|style|body|h[1-6]|div|p|br)[^>]*>)\s*/is', '$1', $output); $output = preg_replace('/\s*(<\/?(html|head|title|meta|script|link|style|body|h[1-6]|div|p|br)[^>]*>)\s*/is', '$1', $output);
Expand Down

0 comments on commit 85adeed

Please sign in to comment.