diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-27 17:11:07 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-27 17:11:07 +0000 |
commit | 4b6cd91aa824c77a34f65fb20e6a32ae268fa9bc (patch) | |
tree | 1be4da552d4b4018b6cf6917e4f4bda28d6be9fa | |
parent | fc79722b392f436622b95d7178a1a05e1d27d814 (diff) | |
download | brdo-4b6cd91aa824c77a34f65fb20e6a32ae268fa9bc.tar.gz brdo-4b6cd91aa824c77a34f65fb20e6a32ae268fa9bc.tar.bz2 |
#168620 by hass: remove extraneous @charset rules from the compressed CSS files, because Safari chokes on them. Actual testing was done at #150759
-rw-r--r-- | includes/common.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 9c233c2d5..299924c93 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1633,6 +1633,8 @@ function drupal_build_css_cache($types, $filename) { foreach ($type as $file => $cache) { if ($cache) { $contents = file_get_contents($file); + // Remove multiple charset declarations for standards compliance (and fixing Safari problems) + $contents = preg_replace('/^@charset\s+[\'"](\S*)\b[\'"];/i', '', $contents); // Return the path to where this CSS file originated from, stripping // off the name of the file at the end of the path. $path = base_path() . substr($file, 0, strrpos($file, '/')) .'/'; |