aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/RedDAV/RedBrowser.php15
-rw-r--r--include/bbcode.php4
2 files changed, 15 insertions, 4 deletions
diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php
index 6b0c77014..d07f60083 100644
--- a/include/RedDAV/RedBrowser.php
+++ b/include/RedDAV/RedBrowser.php
@@ -328,7 +328,7 @@ class RedBrowser extends DAV\Browser\Plugin {
}
/**
- * @brief returns icon name for use with e.g. font-awesome based on filetype
+ * @brief returns icon name for use with e.g. font-awesome based on mime-type
*
* @param string $type
* @return string
@@ -345,15 +345,26 @@ class RedBrowser extends DAV\Browser\Plugin {
'application/msword' => 'icon-file-text-alt',
'application/pdf' => 'icon-file-text-alt',
'application/vnd.oasis.opendocument.text' => 'icon-file-text-alt',
+ 'application/epub+zip' => 'icon-book',
//Spreadsheet
- 'application/vnd.oasis.opendocument.spreadsheet' => 'icon-table',
+ 'application/vnd.oasis.opendocument.spreadsheet' => 'icon-table',
+ 'application/vnd.ms-excel' => 'icon-table',
//Image
'image/jpeg' => 'icon-picture',
'image/png' => 'icon-picture',
'image/gif' => 'icon-picture',
'image/svg+xml' => 'icon-picture',
+
+ //Archive
+ 'application/zip' => 'icon-archive',
+ 'application/x-rar-compressed' => 'icon-archive',
+
+ //Audio
+ 'audio/mpeg' => 'icon-music',
+ 'audio/wav' => 'icon-music',
+ 'application/ogg' => 'icon-music',
);
$iconFromType = 'icon-file-alt';
diff --git a/include/bbcode.php b/include/bbcode.php
index 9445eb007..ab56bda61 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -22,7 +22,7 @@ function tryzrlaudio($match) {
$zrl = is_matrix_url($link);
if($zrl)
$link = zid($link);
- return '<audio src="' . $link . '" controls="controls" ><a href="' . $link . '">' . $link . '</a></audio>';
+ return '<audio src="' . str_replace(' ','%20',$link) . '" controls="controls" ><a href="' . str_replace(' ','%20',$link) . '">' . $link . '</a></audio>';
}
function tryzrlvideo($match) {
@@ -30,7 +30,7 @@ function tryzrlvideo($match) {
$zrl = is_matrix_url($link);
if($zrl)
$link = zid($link);
- return '<video controls="controls" src="' . $link . '" style="width:100%; max-width:' . get_app()->videowidth . 'px"><a href="' . $link . '">' . $link . '</a></video>';
+ return '<video controls="controls" src="' . str_replace(' ','%20',$link) . '" style="width:100%; max-width:' . get_app()->videowidth . 'px"><a href="' . str_replace(' ','%20',$link) . '">' . $link . '</a></video>';
}