From fe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 Sep 2013 15:51:58 +0200 Subject: [PATCH] detect xml and json as text --- src/phorkie/File.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'; } } -- 2.30.2