]> git.p6c8.net - jirafeau_mojo42.git/blobdiff - lib/functions.php
[BUGFIX] Disallow file preview for image/svg+xml files
[jirafeau_mojo42.git] / lib / functions.php
index c831b73e944c29257a367757ad86a79e5a6b03cd..6e5c88650422f9e34cbafee1c148fd3c1ac692a1 100644 (file)
@@ -511,7 +511,7 @@ function jirafeau_is_viewable($mime)
     if (!empty($mime)) {
         $viewable = array('image', 'video', 'audio');
         $decomposed = explode('/', $mime);
-        if (in_array($decomposed[0], $viewable)) {
+        if (in_array($decomposed[0], $viewable) && strpos($mime, 'image/svg+xml') === false) {
             return true;
         }
         $viewable = array('text/plain');

patrick-canterino.de