prefer wtvshared.escape over encodeURIComponent

This commit is contained in:
zefie
2025-08-14 18:57:37 -04:00
parent 54b960a840
commit e7d16387da
27 changed files with 223 additions and 205 deletions

View File

@@ -11,6 +11,6 @@ if (!request_headers.query.url && !request_headers.query.mediaPath) {
handleError('No URL provided');
} else {
const mediaURL = request_headers.query.url || request_headers.query.mediaPath;
const targetURL = 'wtv-author:/scrapbook-add?mediaPath=' + encodeURIComponent(mediaURL);
const targetURL = 'wtv-author:/scrapbook-add?mediaPath=' + wtvshared.escape(mediaURL);
sendToClient(socket, {'Status': 302, 'Location': targetURL, 'wtv-visit': targetURL}, '');
}