From 95b9f4ed2325240411d4e349277c743aef06de6c Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 27 Dec 2011 12:35:29 -0500 Subject: [PATCH] Fix folder names with + characters in it --- files/index.php | 2 +- files/js/fileactions.js | 2 +- files/templates/part.list.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/index.php b/files/index.php index 7e156130d8e..189917150ad 100644 --- a/files/index.php +++ b/files/index.php @@ -71,7 +71,7 @@ $breadcrumb = array(); $pathtohere = ""; foreach( explode( "/", $dir ) as $i ){ if( $i != "" ){ - $pathtohere .= "/$i"; + $pathtohere .= "/".urlencode($i); $breadcrumb[] = array( "dir" => $pathtohere, "name" => $i ); } } diff --git a/files/js/fileactions.js b/files/js/fileactions.js index 9e2688e82c1..4b90ab8cf49 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -137,7 +137,7 @@ FileActions.register('all','Rename',function(){return OC.imagePath('core','actio }); FileActions.register('dir','Open','',function(filename){ - window.location='index.php?dir='+$('#dir').val()+'/'+filename; + window.location='index.php?dir='+encodeURIComponent($('#dir').val())+'/'+encodeURIComponent(filename); }); FileActions.setDefault('dir','Open'); diff --git a/files/templates/part.list.php b/files/templates/part.list.php index 46830ba3a37..157ec4ef42c 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -5,10 +5,10 @@ $relative_modified_date = relative_modified_date($file['mtime']); $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14 if($relative_date_color>200) $relative_date_color = 200; ?> - '> + '> - + -- 2.39.5