diff --git a/src/web/templates/drives.html b/src/web/templates/drives.html index e08dc93e..f8d335c7 100644 --- a/src/web/templates/drives.html +++ b/src/web/templates/drives.html @@ -37,7 +37,7 @@ - .{{hd.file_type}} + .{{hd.file_type}} @@ -127,7 +127,7 @@ - .{{rm.file_type}} + .{{rm.file_type}} diff --git a/src/web/web.py b/src/web/web.py index 30ed3de8..9c617eaa 100644 --- a/src/web/web.py +++ b/src/web/web.py @@ -107,14 +107,17 @@ def drive_list(): cd_conf = [] rm_conf = [] + from werkzeug.utils import secure_filename for d in conf: if d["device_type"] == "SCHD": + d["secure_name"] = secure_filename(d["name"]) d["size_mb"] = "{:,.2f}".format(d["size"] / 1024 / 1024) hd_conf.append(d) elif d["device_type"] == "SCCD": d["size_mb"] = "N/A" cd_conf.append(d) elif d["device_type"] == "SCRM": + d["secure_name"] = secure_filename(d["name"]) d["size_mb"] = "{:,.2f}".format(d["size"] / 1024 / 1024) rm_conf.append(d)