Skip to content

Commit

Permalink
Add embed sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
jrlarano committed Apr 16, 2024
1 parent 3357935 commit d8bb362
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/kits/paged-publication/hotspots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ function renderHotspot(hotspot, position, contentRect, boundingRect) {
el.className += ' sgn-pagedecoration-hotspot';

if (hotspot.embed_link) {
el.innerHTML = `<iframe src="${hotspot.embed_link}" height="100%" width="100%" style="border:0;"></iframe>`;
el.innerHTML = `
<iframe src="${hotspot.embed_link}"
title="sgn-pagedecoration-embed-${hotspot.id}"
height="100%"
width="100%"
sandbox="allow-scripts allow-same-origin"
style="border:0;"
></iframe>
`;
} else if (hotspot.link) {
el.innerHTML = `
<a href="${
Expand Down

0 comments on commit d8bb362

Please sign in to comment.