diff --git a/lib/inliner.php b/lib/inliner.php index 5c078f8..26fe4df 100644 --- a/lib/inliner.php +++ b/lib/inliner.php @@ -10,15 +10,15 @@ function inlineLocalStylesFromHref($inputString) { $cssContent = file_get_contents($cssFilePath); $cssDir = dirname($cssFilePath); - $cssContent = preg_replace_callback('/url\(["\']?(\/.*?|.*?)["\']?\)/i', function($urlMatch) use ($cssDir) { - $url = $urlMatch[1]; - $absolutePath = $cssDir . '/' . $url; - $relativePath = ltrim(substr($absolutePath, strlen($_SERVER['DOCUMENT_ROOT'])), '/'); - return 'url("' . $relativePath . '")'; - }, $cssContent); +// $cssContent = preg_replace_callback('/url\(["\']?(\/.*?|.*?)["\']?\)/i', function($urlMatch) use ($cssDir) { +// $url = $urlMatch[1]; +// $absolutePath = $cssDir . '/' . $url; +// $relativePath = ltrim(substr($absolutePath, strlen($_SERVER['DOCUMENT_ROOT'])), '/'); +// return 'url("' . $relativePath . '")'; +// }, $cssContent); // Minify the CSS content - //$cssContent = minifyCss($cssContent); + $cssContent = minifyCss($cssContent); return ""; }, $inputString);