Missing xmlns attribute
adiba opened this issue · comments
adiba commented
Describe the bug
The xmlns="http://www.w3.org/2000/svg"
attribute is required for image/svg+xml
files, but missing on all icons I've looked at.
In these cases Copy → Data URL will return an invalid image/svg+xml
-URL and the SVG won't be displayed in an <img/>
tag.
Options:
- Always add the xmlns attribute.
- Have a checkbox in the icon details area: "Add missing xmlns attribute to SVG"
- Have separate buttons to copy or download SVG as
image/svg+xml
vs. inline svg.
Reproduction
Select an icon (e.g., material-symbols:123
) and copy SVG to clipboard. Paste and see that xmlns
is missing.
System Info
N/A
Used Package Manager
n/a
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
N commented
Same when download SVG files