diff --git a/lib/inliner.php b/lib/inliner.php index f1ecbb8..a55c687 100644 --- a/lib/inliner.php +++ b/lib/inliner.php @@ -9,6 +9,7 @@ function inlineLocalStylesFromHref($inputString) { $href = isset($match[1]) ? $match[1] : $match[2]; $fname = $_SERVER['DOCUMENT_ROOT'] . '/' . $href; + echo "from $fname"; // Get the content of the local CSS file $cssContent = file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/' . $href); @@ -24,7 +25,7 @@ function inlineLocalStylesFromHref($inputString) { $base64Content = base64_encode($fileContent); // Create the inline data URI - $dataUri = 'url("data:image/' . pathinfo($url, PATHINFO_EXTENSION) . ';base64,' . $base64Content . '")'; + $dataUri = 'url("data:application/octet-stream;base64,' . $base64Content . '")'; return $dataUri; }, $cssContent);