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