properly encode path
This commit is contained in:
parent
8eefaba719
commit
cf449d42e8
3 changed files with 3 additions and 3 deletions
|
@ -960,7 +960,7 @@ function getMimeIcon(mime, ready){
|
|||
getMimeIcon.cache={};
|
||||
|
||||
function getPreviewIcon(path, ready){
|
||||
ready(OC.Router.generate('core_ajax_preview', {file:path, x:44, y:44}));
|
||||
ready(OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:44, y:44}));
|
||||
}
|
||||
|
||||
function getUniqueName(name){
|
||||
|
|
|
@ -852,6 +852,6 @@ class Trashbin {
|
|||
}
|
||||
|
||||
public static function preview_icon($path) {
|
||||
return \OC_Helper::linkToRoute( 'core_ajax_trashbin_preview', array('x' => 44, 'y' => 44, 'file' => $path));
|
||||
return \OC_Helper::linkToRoute( 'core_ajax_trashbin_preview', array('x' => 44, 'y' => 44, 'file' => urlencode($path) ));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ class OC_Helper {
|
|||
* Returns the path to the preview of the file.
|
||||
*/
|
||||
public static function previewIcon($path) {
|
||||
return self::linkToRoute( 'core_ajax_preview', array('x' => 44, 'y' => 44, 'file' => $path));
|
||||
return self::linkToRoute( 'core_ajax_preview', array('x' => 44, 'y' => 44, 'file' => urlencode($path) ));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue