From 4d02e356cadd9af49c915c76b7cd27d01e67edb8 Mon Sep 17 00:00:00 2001 From: Michael Dodge Date: Fri, 4 Jan 2013 23:22:51 -0700 Subject: Fix MSIE conditionals regex in minify output Allows IE conditionals like the following to remain unmodified. ```html ``` Credit to joebert regex from http://www.sitepoint.com/forums/showthread.php?696559-Regex-pattern-to-strip-HTML-comments-but-leave-conditonals&s=3eef4ceb0a59b2fdb946fa56220fb6fd&p=4678083&viewfull=1#post4678083 --- system/core/Output.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Output.php b/system/core/Output.php index ce0500e71..27e711783 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -739,7 +739,7 @@ class CI_Output { $output = preg_replace('!\s{2,}!', ' ', $output); // 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. $output = preg_replace('/\s*(<\/?(html|head|title|meta|script|link|style|body|h[1-6]|div|p|br)[^>]*>)\s*/is', '$1', $output); -- cgit v1.2.3-24-g4f1b