show pictures in folder with special characters, e.g. '+'

This commit is contained in:
Bjoern Schiessle 2012-06-05 16:36:05 +02:00
parent 4bc7387d7c
commit 3a5076d646
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ function viewImage(dir, file) {
if(file.indexOf('.psd')>0){//can't view those
return;
}
var location=OC.filePath('files','ajax','download.php')+'?files='+file+'&dir='+dir;
var location=OC.filePath('files','ajax','download.php')+'?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir);
$.fancybox({
"href": location,
"title": file.replace(/</, "&lt;").replace(/>/, "&gt;"),