Revert "update escape and unescape to encodeURIComponent and decodeURIComponent due to depreciation"

This reverts commit 2be836784d.
This commit is contained in:
zefie
2024-03-25 16:11:09 -04:00
parent 06ba1db8e8
commit ed37185d1b
21 changed files with 55 additions and 1012 deletions

View File

@@ -42,7 +42,7 @@ async function processLC2DownloadPage(flashrom_info, headers, numparts = null) {
}
if (!flashrom_info.is_last_part) {
flashrom_info.next_rompath = request_headers.request_url.replace(encodeURIComponent(request_headers.query.path), encodeURIComponent(flashrom_info.next_rompath.replace(service_name+":/","")));
flashrom_info.next_rompath = request_headers.request_url.replace(escape(request_headers.query.path), escape(flashrom_info.next_rompath.replace(service_name+":/","")));
}
headers = `200 OK

View File

@@ -4,8 +4,8 @@ if (request_headers.query.path) {
var url = service_name + ":/get-lc2-page?path=" + request_headers.query.path;
var 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=" + escape(service_name + ":/" + request_headers.query.path);
if (request_headers.query.numparts) url += escape("?numparts=" + request_headers.query.numparts);
} else {
if (request_headers.query.numparts) url += "&numparts=" + request_headers.query.numparts;
}