Commit f8952b67 authored by Dries's avatar Dries

- Patch #881132 by Garrett Albright: CSS Optimization breaks with non-UTF-8 .css files.

parent 2cfca913
......@@ -3340,7 +3340,7 @@ function drupal_load_stylesheet_content($contents, $optimize = FALSE) {
// Regexp to match single quoted strings.
$single_quot = "'[^'\\\\]*(?:\\\\.[^'\\\\]*)*'";
$contents = preg_replace(
"<($double_quot|$single_quot)|$comment>Sus", // Strip all comment blocks
"<($double_quot|$single_quot)|$comment>Ss", // Strip all comment blocks
"$1", // but keep double/single
$contents); // quoted strings.
$contents = preg_replace(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment