Fix '=' URL-encoded in datalink

This commit is contained in:
Glitchii 2022-03-14 14:45:24 +00:00
parent 43096f29e0
commit 1b21b872bd

View file

@ -29,7 +29,7 @@ var params = new URL(location).searchParams,
data = btoa(escape((JSON.stringify(typeof jsonCode === 'object' ? jsonCode : json)))); data = btoa(escape((JSON.stringify(typeof jsonCode === 'object' ? jsonCode : json))));
if (withURL) { if (withURL) {
let currentURL = new URL(location); let currentURL = new URL(location);
currentURL.searchParams.append('data', data); currentURL.searchParams.append('data', data.replace(/%3D/g, '='));
if (redirect) window.location = currentURL; if (redirect) window.location = currentURL;
data = currentURL.href; data = currentURL.href;
} }