more optimizations

This commit is contained in:
zefie
2025-08-11 15:26:04 -04:00
parent 9c02abd7e1
commit 6d660f387b
15 changed files with 31 additions and 31 deletions

View File

@@ -46,7 +46,7 @@ Content-Type: text/html`;
data = "";
Object.keys(settings_obj).forEach(function (k, v) {
data += k + "=" + escape(settings_obj[k]) + "&";
data += k + "=" + encodeURIComponent(settings_obj[k]) + "&";
});
data = data.substring(0, (data.length - 1));

View File

@@ -110,7 +110,7 @@ Choose the songs that you'd like to include.
var songTitle = musicList[k]['title'];
if (songTitle.length > strLenLimit) songTitle = musicList[k]['title'].substr(0, strLenLimit - 3) + "...";
if (musicList.length > 14) data += '<font size="-2">';
data += `<a href="${musicList[k]['url']}?wtv-title=${escape(musicList[k]['title'])}" onmouseout="clearTitle()" onmouseover="showTitle('${musicList[k]['title'].replace(/\'/g, "\\'")}')">${songTitle}</a>
data += `<a href="${musicList[k]['url']}?wtv-title=${encodeURIComponent(musicList[k]['title'])}" onmouseout="clearTitle()" onmouseover="showTitle('${musicList[k]['title'].replace(/\'/g, "\\'")}')">${songTitle}</a>
</td></tr></tbody></table>`;
if (musicList.length > 14) data += '</font>';
songsListed++;

View File

@@ -31,8 +31,8 @@ if (request_headers.query && session_data) {
var qraw_split = qraw[i].split("=");
if (qraw_split.length == 2) {
var k = qraw_split[0];
if (k == "enableCategory") music_obj['enableCategories'].push(unescape(qraw[i].split("=")[1].replace(/\+/g, "%20")));
if (k == "enableSong") music_obj['enableSongs'].push(unescape(qraw[i].split("=")[1].replace(/\+/g, "%20")));
if (k == "enableCategory") music_obj['enableCategories'].push(decodeURIComponent(qraw[i].split("=")[1].replace(/\+/g, "%20")));
if (k == "enableSong") music_obj['enableSongs'].push(decodeURIComponent(qraw[i].split("=")[1].replace(/\+/g, "%20")));
}
}
}