diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index d8b118c1..b58bcdb5 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -2374,7 +2374,7 @@ class HttpCli(object): doc = self.uparam.get("doc") if self.can_read else None if doc: - doc = unquotep(doc.replace("+", " ")) + doc = unquotep(doc.replace("+", " ").split("?")[0]) j2a["docname"] = doc if next((x for x in files if x["name"] == doc), None): with open(os.path.join(abspath, doc), "rb") as f: diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 60750645..a55a4772 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -2389,6 +2389,7 @@ var showfile = (function () { continue; td.innerHTML = '-txt-'; + td.getElementsByTagName('a')[0].setAttribute('href', '?doc=' + fn); } r.mktree(); if (em) { @@ -3361,6 +3362,7 @@ document.onkeydown = function (e) { return; treectl.hide(); + thegrid.setvis(true); var html = mk_files_header(tagord), seen = {}; html.push('
'); @@ -3925,7 +3927,7 @@ var treectl = (function () { showfile.files.push({ 'id': id, 'name': fname }); if (tn.lead == '-') - tn.lead = '-txt-'; var ln = ['