From 582631323acb52b8348975d29a871d950c2e6451 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Thu, 4 Jul 2013 19:23:31 +0300 Subject: [PATCH] Migrate to encodePath --- apps/files/templates/part.breadcrumb.php | 3 +-- apps/files/templates/part.list.php | 6 ++---- apps/files_trashbin/templates/part.breadcrumb.php | 3 +-- apps/files_trashbin/templates/part.list.php | 6 ++---- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index 9886b42e424..9db27eb9b29 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -7,8 +7,7 @@ + $dir = \OCP\Util::encodePath($crumb["dir"]); ?>
svg" data-dir=''> diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 502ddd329b1..97a9026860b 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -17,10 +17,8 @@ $totalsize = 0; ?> // 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>160) $relative_date_color = 160; - $name = rawurlencode($file['name']); - $name = str_replace('%2F', '/', $name); - $directory = rawurlencode($file['directory']); - $directory = str_replace('%2F', '/', $directory); ?> + $name = \OCP\Util::encodePath($file['name']); + $directory = \OCP\Util::encodePath($file['directory']); ?> + $dir = \OCP\Util::encodePath($crumb["dir"]); ?>
svg" data-dir=''> 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']); ?>