Skip to content

Commit

Permalink
Merge pull request #973 from MuckRock/972-fix-iframe
Browse files Browse the repository at this point in the history
iframes are not self-closing
  • Loading branch information
eyeseast authored Dec 12, 2024
2 parents 9caf00f + dc92ea8 commit 6801dac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 6801dac

Please sign in to comment.