diff options
author | Urban Müller | 2022-02-24 16:05:04 +0100 |
---|---|---|
committer | Urban Müller | 2022-02-24 16:05:04 +0100 |
commit | b9d1be1f3de685ed31c6f2e4efc3cb51a999fedc (patch) | |
tree | a157504bfb1e08a477cdc5dd3a69035c295723fc /it_debug.class | |
parent | 2aa4bcbff33fcb4e85aed50884012ffd1c812108 (diff) | |
download | itools-b9d1be1f3de685ed31c6f2e4efc3cb51a999fedc.tar.gz itools-b9d1be1f3de685ed31c6f2e4efc3cb51a999fedc.tar.bz2 itools-b9d1be1f3de685ed31c6f2e4efc3cb51a999fedc.zip |
use plaintext output for non-html web pages
Diffstat (limited to 'it_debug.class')
-rw-r--r-- | it_debug.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_debug.class b/it_debug.class index b04d7b7..8894170 100644 --- a/it_debug.class +++ b/it_debug.class @@ -78,7 +78,7 @@ static function srcline($stackoffs = 0) */ static function dump($args, $p = []) { - $p += ['html' => $_SERVER['REMOTE_ADDR'] ? true : false, 'color' => true]; + $p += ['html' => $_SERVER['REMOTE_ADDR'] && !it::match('\.(xml|json|plist|itjs|txt|raw|csv)$', $_SERVER['PHP_SELF']) ? true : false, 'color' => true]; $htmlspecialchars = array("&" => "&", '<' => "<", '>' => ">"); if ((preg_match('/csv|txt|gif|jpg/', $_SERVER['PHP_SELF']) || preg_grep('#text/(calendar|css|javascript|json|plain|rfc822|xml)|application/#', headers_list()) || $GLOBALS['debug_edplain']) && !$GLOBALS['debug_edhtml']) |