files_imageviewer: Double encode paths. Fixes oc-1016.

remotes/origin/stable45
Thomas Tanghus 13 years ago
parent 4cbdd59859
commit 1118498050
  1. 2
      apps/files_imageviewer/js/lightbox.js

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

Loading…
Cancel
Save