Skip to content

Commit

Permalink
Merge pull request #4401 from serlo/fix-h5p-plugin-edusharing
Browse files Browse the repository at this point in the history
fix(plugin-edusharing): make H5P embeds work again
  • Loading branch information
LarsTheGlidingSquirrel authored Jan 15, 2025
2 parents 0c3d433 + ecc2b07 commit d7e74dd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/editor/src/plugins/edusharing-asset/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,18 @@ export function EdusharingAssetRenderer(props: {
data-embed-type={embedData.type}
>
{/* `srcDoc` -> Sets the iframe content */}
{/* `sandbox="allow-scripts"` -> Limit iframe access to parent context but allow scripts to execute */}
{/* No attribute 'sandbox' because it broke H5P embeds. */}
{embedData.defineContainerHeight ? (
<iframe
srcDoc={embedData.html}
style={{ width: '100%', height: '100%' }}
sandbox="allow-scripts"
/>
) : (
<MemoizedIframeResizer
// Necessary when using srcDoc
checkOrigin={false}
srcDoc={embedData.html}
style={{ width: '100%' }}
sandbox="allow-scripts"
/>
)}
</div>
Expand Down

0 comments on commit d7e74dd

Please sign in to comment.