X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FAsset%2FCssOptimizer.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FAsset%2FCssOptimizer.php;h=94c2240abc1615db728dd69a4ff0c147ab214eae;hp=4ad7ba134ccaece993076f328c096c2987a512e9;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/lib/Drupal/Core/Asset/CssOptimizer.php b/web/core/lib/Drupal/Core/Asset/CssOptimizer.php index 4ad7ba134..94c2240ab 100644 --- a/web/core/lib/Drupal/Core/Asset/CssOptimizer.php +++ b/web/core/lib/Drupal/Core/Asset/CssOptimizer.php @@ -119,7 +119,7 @@ class CssOptimizer implements AssetOptimizerInterface { // If a BOM is found, convert the file to UTF-8, then use substr() to // remove the BOM from the result. if ($encoding = (Unicode::encodingFromBOM($contents))) { - $contents = Unicode::substr(Unicode::convertToUtf8($contents, $encoding), 1); + $contents = mb_substr(Unicode::convertToUtf8($contents, $encoding), 1); } // If no BOM, check for fallback encoding. Per CSS spec the regex is very strict. elseif (preg_match('/^@charset "([^"]+)";/', $contents, $matches)) { @@ -189,7 +189,7 @@ class CssOptimizer implements AssetOptimizerInterface { if ($optimize) { // Perform some safe CSS optimizations. // Regexp to match comment blocks. - $comment = '/\*[^*]*\*+(?:[^/*][^*]*\*+)*/'; + $comment = '/\*[^*]*\*+(?:[^/*][^*]*\*+)*/'; // Regexp to match double quoted strings. $double_quot = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"'; // Regexp to match single quoted strings.