Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iframes are not self-closing #973

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lib/components/documents/Share.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@
case "document":
permalink = canonicalUrl(document);
embedSrc = embedUrl(document, embedUrlParams);
iframe = `<iframe src="${embedSrc.href}" width="${$embedSettings.width ?? "100%"}" height="${$embedSettings.height ?? "600px"}" style="${style}" />`;
iframe = `<iframe src="${embedSrc.href}" width="${$embedSettings.width ?? "100%"}" height="${$embedSettings.height ?? "600px"}" style="${style}"></iframe>`;
break;
case "page":
permalink = pageUrl(document, page);
embedSrc = canonicalPageUrl(document, page);
embedSrc.searchParams.set("embed", "1");
iframe = `<iframe src="${embedSrc.href}" width="100%" height="600px" style="${style}" />`;
iframe = `<iframe src="${embedSrc.href}" width="100%" height="600px" style="${style}"></iframe>`;
break;
case "note":
const noteObject = document.notes?.find(
Expand All @@ -102,7 +102,7 @@
permalink = noteUrl(document, noteObject);
embedSrc = canonicalNoteUrl(document, noteObject);
embedSrc.searchParams.set("embed", "1");
iframe = `<iframe src="${embedSrc.href}" width="100%" height="600px" style="${style}" />`;
iframe = `<iframe src="${embedSrc.href}" width="100%" height="600px" style="${style}"></iframe>`;
}
break;
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/projects/ProjectShare.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

$: permalink = canonicalUrl(project);
$: embedSrc = embedUrl(project);
$: iframe = `<iframe src="${embedSrc.href}" />`;
$: iframe = `<iframe src="${embedSrc.href}"></iframe>`;
</script>

<div class="share">
<iframe class="embed" title="Embed Preview" src={embedSrc.href} />
<iframe class="embed" title="Embed Preview" src={embedSrc.href}></iframe>
<div class="fields">
{#if isPrivate}
<div class="banner">
Expand Down
Loading