From: Christian Weiske Date: Wed, 4 Sep 2013 13:51:58 +0000 (+0200) Subject: detect xml and json as text X-Git-Tag: v0.4.0~77 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/fe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9?ds=sidebyside detect xml and json as text --- diff --git a/src/phorkie/File.php b/src/phorkie/File.php index 63d23e6..dc90d9b 100644 --- a/src/phorkie/File.php +++ b/src/phorkie/File.php @@ -165,7 +165,9 @@ class File $type = $GLOBALS['phorkie']['languages'][$ext]['mime']; return substr($type, 0, 5) === 'text/' - || $type == 'application/javascript'; + || $type == 'application/javascript' + || substr($type, -4) == '+xml' + || substr($type, -5) == '+json'; } }