aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/templates
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-04 19:23:31 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-09 17:46:11 +0300
commit582631323acb52b8348975d29a871d950c2e6451 (patch)
treeefd31a08cb77079b27e1a10d3bb0d5c6ef703ff4 /apps/files_trashbin/templates
parent5a3fce12a4496ec6d2903902e035af017e07f2f8 (diff)
downloadnextcloud-server-582631323acb52b8348975d29a871d950c2e6451.tar.gz
nextcloud-server-582631323acb52b8348975d29a871d950c2e6451.zip
Migrate to encodePath
Diffstat (limited to 'apps/files_trashbin/templates')
-rw-r--r--apps/files_trashbin/templates/part.breadcrumb.php3
-rw-r--r--apps/files_trashbin/templates/part.list.php6
2 files changed, 3 insertions, 6 deletions
diff --git a/apps/files_trashbin/templates/part.breadcrumb.php b/apps/files_trashbin/templates/part.breadcrumb.php
index 2801e04e9ad..85bb16ffa2d 100644
--- a/apps/files_trashbin/templates/part.breadcrumb.php
+++ b/apps/files_trashbin/templates/part.breadcrumb.php
@@ -11,8 +11,7 @@
<?php endif;?>
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
$crumb = $_["breadcrumb"][$i];
- $dir = str_replace('+', '%20', urlencode($crumb["dir"]));
- $dir = str_replace('%2F', '/', $dir); ?>
+ $dir = \OCP\Util::encodePath($crumb["dir"]); ?>
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) p('last');?> svg"
data-dir='<?php p($dir);?>'>
<a href="<?php p($_['baseURL'].$dir); ?>"><?php p($crumb["name"]); ?></a>
diff --git a/apps/files_trashbin/templates/part.list.php b/apps/files_trashbin/templates/part.list.php
index 92a38bd2635..94a8eec9515 100644
--- a/apps/files_trashbin/templates/part.list.php
+++ b/apps/files_trashbin/templates/part.list.php
@@ -4,10 +4,8 @@
// the older the file, the brighter the shade of grey; days*14
$relative_date_color = round((time()-$file['date'])/60/60/24*14);
if($relative_date_color>200) $relative_date_color = 200;
- $name = str_replace('+', '%20', urlencode($file['name']));
- $name = str_replace('%2F', '/', $name);
- $directory = str_replace('+', '%20', urlencode($file['directory']));
- $directory = str_replace('%2F', '/', $directory); ?>
+ $name = \OCP\Util::encodePath($file['name']);
+ $directory = \OCP\Util::encodePath($file['directory']); ?>
<tr data-filename="<?php p($file['name']);?>"
data-type="<?php ($file['type'] == 'dir')?p('dir'):p('file')?>"
data-mime="<?php p($file['mimetype'])?>"