Editor: fix decode deeplink data
This commit is contained in:
parent
a8038e4dca
commit
d4a5e22447
@ -62,6 +62,11 @@ function DeepLinker(options) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bytesToBase64(bytes) {
|
||||||
|
const binString = String.fromCodePoint(...bytes);
|
||||||
|
return btoa(binString);
|
||||||
|
}
|
||||||
|
|
||||||
export const getDeepLink = (
|
export const getDeepLink = (
|
||||||
location,
|
location,
|
||||||
email,
|
email,
|
||||||
@ -84,9 +89,8 @@ export const getDeepLink = (
|
|||||||
},
|
},
|
||||||
originalUrl: originalUrl,
|
originalUrl: originalUrl,
|
||||||
};
|
};
|
||||||
const deepLinkData = window.btoa(
|
const stringifyData = JSON.stringify(jsonData);
|
||||||
encodeURIComponent(JSON.stringify(jsonData))
|
const deepLinkData = bytesToBase64(new TextEncoder().encode(stringifyData));
|
||||||
);
|
|
||||||
|
|
||||||
const linker = new DeepLinker({
|
const linker = new DeepLinker({
|
||||||
onIgnored: function () {
|
onIgnored: function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user