Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ const StyledButton = ({
const HtmlPreviewIframe = ({ code }: { code: string }) => (
<iframe
srcDoc={code}
sandbox="allow-popups"
// 预览需要执行用户生成 HTML 内的 JS,但不开放 allow-same-origin,避免脚本拿到主站上下文。
sandbox="allow-scripts allow-popups"
referrerPolicy="no-referrer"
style={{
display: 'block',
Expand Down