Encode the collection sharing URL (#1362)

This commit is contained in:
Henry Wilkinson 2023-11-09 16:24:39 -05:00 committed by GitHub
parent 30bbefbeaa
commit a71815a342
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,7 +221,8 @@ export class CollectionDetail extends LiteElement {
private renderShareInfo = () => {
const replaySrc = this.getPublicReplayURL();
const publicReplayUrl = `https://replayweb.page?source=${replaySrc}`;
const encodedReplaySrc = encodeURIComponent(replaySrc);
const publicReplayUrl = `https://replayweb.page?source=${encodedReplaySrc}`;
const embedCode = `<replay-web-page source="${replaySrc}"></replay-web-page>`;
const importCode = `importScripts("https://replayweb.page/sw.js");`;