diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index 3c6c5dbd26776b605046d9c6dcf4bb0e3eb95cf7..8b7ae23638757d1c51d37afd2a351181fe34df54 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -9,9 +9,9 @@
 	// the older the file, the brighter the shade of grey; days*14
 	$relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
 	if($relative_date_color>200) $relative_date_color = 200;
-	$name = str_replace('+', '%20', urlencode($file['name']));
+	$name = rawurlencode($file['name']);
 	$name = str_replace('%2F', '/', $name);
-	$directory = str_replace('+', '%20', urlencode($file['directory']));
+	$directory = rawurlencode($file['directory']);
 	$directory = str_replace('%2F', '/', $directory); ?>
 	<tr data-id="<?php echo $file['fileid']; ?>"
 		data-file="<?php echo $name;?>"