summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2023-07-31 14:29:42 +0200
committerChristian Schneider2023-07-31 14:29:42 +0200
commitc7da6f7683cac617afc201b48b0b1c4268b38d05 (patch)
treea84a7722948fa8d49c482d7b572f1181855e601e
parent2cca98b6c889fda20b949b7ce2faad29b2104c3e (diff)
downloaditools-c7da6f7683cac617afc201b48b0b1c4268b38d05.tar.gz
itools-c7da6f7683cac617afc201b48b0b1c4268b38d05.tar.bz2
itools-c7da6f7683cac617afc201b48b0b1c4268b38d05.zip
Stylesheets: Pass url(...) through U() for normalization/OneDomain
-rw-r--r--itjs.php1
1 files changed, 1 insertions, 0 deletions
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'])