properly encode path

remotes/origin/stable6
Georg Ehrke 13 years ago
parent 8eefaba719
commit cf449d42e8
  1. 2
      apps/files/js/files.js
  2. 2
      apps/files_trashbin/lib/trash.php
  3. 2
      lib/helper.php

@ -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…
Cancel
Save