properly encode path

This commit is contained in:
Georg Ehrke 2013-07-10 11:25:28 +02:00
parent 8eefaba719
commit cf449d42e8
3 changed files with 3 additions and 3 deletions

View file

@ -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){

View file

@ -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) ));
}
}

View file

@ -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) ));
}
/**