fix: Gist embed allowing unsafe html (#7883)

This commit is contained in:
David Luzar
2024-04-12 12:57:43 +02:00
committed by David Luzar
parent 81046ccd6b
commit 2879c9d852
2 changed files with 31 additions and 46 deletions

View File

@@ -946,7 +946,11 @@ class App extends React.Component<AppProps, AppState> {
title="Excalidraw Embedded Content"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen={true}
sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads"
sandbox={`${
embedLink?.sandbox?.allowSameOrigin
? "allow-same-origin"
: ""
} allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads`}
/>
)}
</div>