? common.inc-45.patch Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.1005 diff -u -p -r1.1005 common.inc --- includes/common.inc 3 Oct 2009 19:16:03 -0000 1.1005 +++ includes/common.inc 4 Oct 2009 10:40:33 -0000 @@ -3060,11 +3060,14 @@ function drupal_load_stylesheet_content( if ($optimize) { // Perform some safe CSS optimizations. + $contents = preg_replace('{ + (?<=\\\\\*/)([^/\*]+/\*)([^\*/]+\*/) # Add a backslash also at the end hack comment, so the next pass will not touch it + }x', '\1\\\\\2', $contents); $contents = preg_replace('< - \s*([@{}:;,]|\)\s|\s\()\s* | # Remove whitespace around separators, but keep space around parentheses. - /\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks. - [\n\r] # Remove line breaks. - >x', '\1', $contents); + \s*([@{}:;,]|\)\s|\s\()\s* | # Remove whitespace around separators, but keep space around parentheses. + /\*[^*\\\\]*\*+([^/*][^*]*\*+)*/ | # Remove comments that are not CSS hacks. + [\n\r] # Remove line breaks. + >x', '\1', $contents); } // Replaces @import commands with the actual stylesheet content.