diff --git a/boost.module b/boost.module
index b11c14fcda31b873de252350081b312652b34ead..d77104ce03af68cfaae1debc89e9f8b02e0cb774 100644
--- a/boost.module
+++ b/boost.module
@@ -1751,23 +1751,22 @@ function boost_path_redirect_load($where = array(), $args = array(), $sort = arr
function boost_cache_css_js_files($buffer) {
if (BOOST_CACHE_CSS) {
// Extract external css files from html document
- $css = explode(' $value) {
- // Only grab the first string, containing the css filename.
- $css[$key] = array_shift(explode(' />', $value));
+ $css_files = explode(' $value) {
+ // Extract css filename
+ $css_files[$key] = array_shift(explode('"', array_shift(explode('?', array_pop(explode(base_path(), array_pop(explode('//', array_pop(explode('href="', array_shift(explode('" />', $value))))))))))));
}
- $css = implode('',$css);
-
- _boost_copy_css_files($css);
+ _boost_copy_css_files($css_files);
}
if (BOOST_CACHE_JS) {
- $js = explode('