prefer wtvshared.escape over encodeURIComponent
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
const minisrv_service_file = true;
|
||||
|
||||
if (request_headers.query.path) {
|
||||
let url = service_name + ":/get-lc2-page?path=" + encodeURIComponent(request_headers.query.path);
|
||||
let url = service_name + ":/get-lc2-page?path=" + wtvshared.escape(request_headers.query.path);
|
||||
const romtype = session_data.get("wtv-client-rom-type");
|
||||
if (romtype === "bf0app") {
|
||||
url = "client:updateflash?ipaddr=" + minisrv_config.services[service_name].host + "&port=" + minisrv_config.services[service_name].port + "&path=" + encodeURIComponent(service_name + ":/" + request_headers.query.path);
|
||||
if (request_headers.query.numparts) url += encodeURIComponent("?numparts=" + request_headers.query.numparts);
|
||||
url = "client:updateflash?ipaddr=" + minisrv_config.services[service_name].host + "&port=" + minisrv_config.services[service_name].port + "&path=" + wtvshared.escape(service_name + ":/" + request_headers.query.path);
|
||||
if (request_headers.query.numparts) url += wtvshared.escape("?numparts=" + request_headers.query.numparts);
|
||||
} else {
|
||||
if (request_headers.query.numparts) url += "&numparts=" + request_headers.query.numparts;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user