Skip to content

Commit 6bf836a

Browse files
committed
AB#64926 fix svg styles leaking outside of svg elements
1 parent 91470a3 commit 6bf836a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/TemplateImage.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ class TemplateImage extends Component {
8181

8282
return (
8383
<UploadDrop className={className} onDrop={this.onDrop} name="footer_image" disablePreview>
84-
<Item dangerouslySetInnerHTML={{ __html: svg }} />
84+
<Item>
85+
<iframe
86+
title="SVG"
87+
srcDoc={`<html><body>${svg}</body></html>`}
88+
style={{ border: 'none', width: '100%', height: '100%' }}
89+
/>
90+
</Item>
8591
</UploadDrop>
8692
);
8793
}

0 commit comments

Comments
 (0)