From 5daaaedf9981849cedf355b17783a2ae05072c59 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 6 Feb 2016 18:32:48 -0800 Subject: [PATCH] Corrected CSS url paths. --- e107_handlers/js_manager.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/e107_handlers/js_manager.php b/e107_handlers/js_manager.php index 6cea20e59..347dca355 100644 --- a/e107_handlers/js_manager.php +++ b/e107_handlers/js_manager.php @@ -1448,15 +1448,19 @@ class e_jsmanager return $this->compress($content, 'css'); } + $path = str_replace("../",'',$path); + + $basePath = SITEURL.dirname($path)."/"; + foreach($match[1] as $k=>$v) { - if(substr($v,5) == 'data:') + if(substr($v,5) == 'data:' || substr($v,4) == 'http') { unset($match[0][$k]); continue; } - $dir = "url(../../".dirname($path)."/".$v.")"; // relative to e_WEB_ABS."cache/"; + $dir = "url(".$basePath.$v.")"; // relative to e_WEB_ABS."cache/"; $newpath[$k] = $dir; }