From f1f04bef981aa8d449448185a7ee1e0ffbea748c Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 19 May 2022 12:27:19 -0700 Subject: [PATCH] Fixed files not downloading when & is in name, #4015 --- views/default-mobile.handlebars | 8 ++------ views/default.handlebars | 9 +-------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 8e480ac4..b2941325 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -2525,9 +2525,7 @@ for (var i in filetreexx) { // Figure out the name and shortname var f = filetreexx[i], name = f.n, shortname; - shortname = name; if (name.length > 40) { shortname = EscapeHtml(name.substring(0, 40)) + "..."; } else { shortname = EscapeHtml(name); } - name = EscapeHtml(name); // Figure out the date //var fdatestr = ''; @@ -2540,7 +2538,7 @@ var h = ''; if (f.t < 3 || f.t == 4) { var right = (f.t == 1 || f.t == 4) ? p5getQuotabar(f) : ''; - h = '
 ' + right + '
' + shortname + '
'; + h = '
 ' + right + '
' + shortname + '
'; } else { var link = shortname; var publiclink = ''; @@ -5214,9 +5212,7 @@ for (var i in filetreexx) { // Figure out the name and shortname var f = filetreexx[i], name = f.n, shortname; - shortname = name; - if (name.length > 70) { shortname = EscapeHtml(name.substring(0, 70)) + "..."; } else { shortname = EscapeHtml(name); } - name = EscapeHtml(name); + if (name.length > 40) { shortname = EscapeHtml(name.substring(0, 70)) + "..."; } else { shortname = EscapeHtml(name); } // Figure out the size var fsize = ''; diff --git a/views/default.handlebars b/views/default.handlebars index 0028b6a0..77acae87 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -10249,9 +10249,7 @@ for (var i in filetreexx) { // Figure out the name and shortname var f = filetreexx[i], name = f.n, shortname; - shortname = name; if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + ("..." + ''); } else { shortname = EscapeHtml(name); } - name = EscapeHtml(name); // Figure out the date var fdatestr = ''; @@ -13432,9 +13430,7 @@ for (var i in filetreexx) { // Figure out the name and shortname var f = filetreexx[i], name = f.n, shortname; - shortname = name; if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + "..." + ''; } else { shortname = EscapeHtml(name); } - name = EscapeHtml(name); // Figure out the date var fdatestr = ''; @@ -13447,7 +13443,7 @@ var h = ''; if (f.t < 3 || f.t == 4) { var right = (f.t == 1 || f.t == 4)?p5getQuotabar(f):'', title = ''; - h = '
 ' + right + '
' + shortname + '
'; + h = '
 ' + right + '
' + shortname + '
'; } else { var link = shortname, publiclink = '', loginkey = (urlargs.key)?('&key=' + urlargs.key):''; if (publicfolder) { publiclink = ' '; } @@ -15916,10 +15912,7 @@ // Filter out files if ((f.t == 3) && (fileFilter != '') && (f.nx.toLowerCase().endsWith(fileFilter) == false)) { continue; } - - shortname = name; if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + ("..." + ''); } else { shortname = EscapeHtml(name); } - name = EscapeHtml(name); // Figure out the size var fsize = '';