-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Is your feature request related to a problem? Please describe.
No, but would be nice to have a single sanitizing library/package
Describe the solution you'd like
SVG files, unlike other image formats are based on XML so they can store malicious tags eg:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" baseProfile="full" >
<polygon id="triangle" points="0,0 0,50 50,0" fill="#009900" stroke="#004400"/>
<script type="text/javascript">
alert(document.domain);
</script>
</svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">
<script>//<![CDATA[
alert(document.domain)
//]]>
</script>
</svg>Describe alternatives you've considered
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels