summaryrefslogtreecommitdiff
path: root/itjs.php
diff options
context:
space:
mode:
authorUrban Müller2011-06-06 17:30:47 +0000
committerUrban Müller2011-06-06 17:30:47 +0000
commit8207b6b8510901262cdbdf3ad12004f8bb7101bf (patch)
tree2871112040e644ca168795ba645e835f0f577a7b /itjs.php
parent8ec008f48910cba508a4bd5a574034f957e7301b (diff)
downloaditools-8207b6b8510901262cdbdf3ad12004f8bb7101bf.tar.gz
itools-8207b6b8510901262cdbdf3ad12004f8bb7101bf.tar.bz2
itools-8207b6b8510901262cdbdf3ad12004f8bb7101bf.zip
fake css output for validator
Diffstat (limited to 'itjs.php')
-rw-r--r--itjs.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/itjs.php b/itjs.php
index fb41ec6..c289090 100644
--- a/itjs.php
+++ b/itjs.php
@@ -32,7 +32,8 @@ $files = itjs::filenames(it::match('/itjs/([a-z0-9_,.-]*)', $_SERVER['PHP_SELF']
foreach ($files as $file)
{
ob_start(); # Needs to capture inside loop to guarantee file order
- $data .= it::replace(array('^1$' => ""), @include($file));
+ if (!(it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) && it::match('jquery-ui\.css', $file)))
+ $data .= it::replace(array('^1$' => ""), @include($file));
$data .= ob_get_clean();
}
@@ -49,6 +50,8 @@ else if (it::match('\.css', $_SERVER['PHP_SELF']))
$data .= "\n#it_boot_dom { display:none }\n"; # Append magic style for it_boot
if (!it::match('^devel', $GLOBALS['ULTRASERVERTYPE']))
$data = it::replace(array('[ \t]*([{};])[ \t]*' => '$1', '/\*.*?\*/' => ""), $data);
+ if (it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']))
+ $data = it::replace(array('background[^;}]*gradient[^;}]*;?' => "", '(filter:\s*progid|text-overflow:|zoom:|-webkit|display:-moz-|-moz-|-o-|cursor:|border-radius:|\w+:expression)[^;}]*;?' => "", 'html\.ie6.*' => "", '([^/])\*(\w)' => '$1$2'), $data);
}
else if (!it::match('\.html$', $file))
{