From 6fa985166b3deffe7ce24ceadd551f8eac28a0bd Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 8 Nov 2018 15:43:00 +0100 Subject: dont validate external css --- itjs.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'itjs.php') diff --git a/itjs.php b/itjs.php index 50e2d47..5ec4ae6 100644 --- a/itjs.php +++ b/itjs.php @@ -29,6 +29,9 @@ if (is_array($_GET['files']) || it::match('/server/', $_SERVER['DOCUMENT_ROOT']) itjs::far_future_headers(); # may exit +if (it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT'])) + $_GET['files'] = it::replace([',jquery.fancybox.css,' => ","], $_GET['files']); + $files = itjs::filenames($_GET['files'] ?: it::match('/itjs/([-a-z0-9_,.]*)', $_SERVER['PHP_SELF'])); $data = itjs::filecontents($files); $lastfile = end($files) ?: it::match('[^,]+$', $_GET['files']); # set correct mime type even if files not found -- cgit v1.2.3