From c7da6f7683cac617afc201b48b0b1c4268b38d05 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 31 Jul 2023 14:29:42 +0200 Subject: Stylesheets: Pass url(...) through U() for normalization/OneDomain --- itjs.php | 1 + 1 file changed, 1 insertion(+) (limited to 'itjs.php') diff --git a/itjs.php b/itjs.php index feb403a..12d8213 100644 --- a/itjs.php +++ b/itjs.php @@ -44,6 +44,7 @@ if (it::match('\.gif$', $lastfile)) else if (it::match('\.css', $lastfile)) { header("Content-Type: text/css"); + $data = preg_replace_callback('/\burl\(["\']?([^"\'\)]+)["\']?\s*\)/', fn($v) => 'url(' . U($v[1]) . ')', $data); # Pass url(...) through U() for normalization/OneDomain if (!it::match('^devel', $GLOBALS['ULTRASERVERTYPE'])) $data = it::replace(array('[ \t]*([{};])[ \t]*' => '$1', ($nostrip ? '_LEAVE_COMMENTS_' : '/\*.*?\*/') => ""), $data); if (it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) || $_GET['w3c']) -- cgit v1.2.3