1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 17:46:31 +02:00

Add escape for path

This commit is contained in:
Dmitriy Novash
2020-10-08 20:22:29 +03:00
parent ade6bd4e20
commit 1d69039b1e

View File

@@ -171,9 +171,9 @@ function IFM(params) {
else if (self.config.download && self.config.zipnload) {
if (self.config.root_public_url) {
if (self.config.root_public_url.charAt(0) == "/")
item.link = self.pathCombine(window.location.origin, self.config.root_public_url, self.currentDir, self.hrefEncode(item.name) );
item.link = self.pathCombine(window.location.origin, self.config.root_public_url, self.hrefEncode(self.currentDir), self.hrefEncode(item.name) );
else
item.link = self.pathCombine(self.config.root_public_url, self.currentDir, self.hrefEncode(item.name) );
item.link = self.pathCombine(self.config.root_public_url, self.hrefEncode(self.currentDir), self.hrefEncode(item.name) );
} else
item.link = self.api+"?api="+(item.download.action=="zipnload"?"zipnload":"proxy")+"&dir="+self.hrefEncode(self.currentDir)+"&filename="+self.hrefEncode(item.download.name);
} else