]> git.p6c8.net - jirafeau/jirafeau.git/blobdiff - lib/functions.php
Check for commas in MIME type before generating preview
[jirafeau/jirafeau.git] / lib / functions.php
index 7ac4c9e3f4eb18fb27c2e443131e339b1cf54227..f9fbd9b72a92d79fa24e883db6f470bd30cb998a 100644 (file)
@@ -623,7 +623,7 @@ function jirafeau_is_viewable($mime)
     if (!empty($mime)) {
         $viewable = array('image', 'video', 'audio');
         $decomposed = explode('/', $mime);
-        if (in_array($decomposed[0], $viewable) && stripos($mime, 'image/svg+xml') === false) {
+        if (in_array($decomposed[0], $viewable) && stripos($mime, 'image/svg+xml') === false && strpos($mime, ',') === false) {
             return true;
         }
         $viewable = array('text/plain');

patrick-canterino.de