fix: use encode/decodeURIComponent (#10183)
This commit is contained in:
parent
d388a6edfd
commit
d0c68ff002
@ -184,7 +184,7 @@ export class PuppeteerURL {
|
||||
const [functionName = '', siteString = ''] = url.split(';');
|
||||
const puppeteerUrl = new PuppeteerURL();
|
||||
puppeteerUrl.#functionName = functionName;
|
||||
puppeteerUrl.#siteString = globalThis.atob(siteString);
|
||||
puppeteerUrl.#siteString = decodeURIComponent(siteString);
|
||||
return puppeteerUrl;
|
||||
};
|
||||
|
||||
@ -204,9 +204,10 @@ export class PuppeteerURL {
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return `pptr:${[this.#functionName, globalThis.btoa(this.#siteString)].join(
|
||||
';'
|
||||
)}`;
|
||||
return `pptr:${[
|
||||
this.#functionName,
|
||||
encodeURIComponent(this.#siteString),
|
||||
].join(';')}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user