aykutkardas / svgps.app

SVGPS converts your icons into a single JSON file that is ready to use in your frontend or mobile projects.
https://svgps.app
MIT License
292 stars 22 forks source link

Missing xmlns attribute when downloading a new SVG file #262

Closed zehraworks closed 1 year ago

zehraworks commented 1 year ago

Copying and downloading an SVG file give the same contents but I think downloaded SVG files should contain xmlns attribute because without it browsers don't display them and can't recognize them as an SVG document.

Actual downloaded file content:

<svg viewbox="0 0 32 32" width="32" height="32" stroke="currentColor" fill="currentColor">
<path d="M28 4.9a1 1 0 0 0-0.9-0.9C17.5 3.4 9.9 6.3 6.6 11.7a10.9 10.9 0 0 0-1.6 6.1c0.1 2 0.7 4 1.8 6l-2.5 2.5a1 1 0 0 0 0 1.4 1 1 0 0 0 1.4 0L8.2 25.3c2 1.1 4 1.6 6 1.7h0.4a10.9 10.9 0 0 0 5.7-1.6c5.4-3.3 8.3-10.9 7.7-20.5Zm-8.7 18.8c-2.9 1.7-6.2 1.8-9.7 0.1l11.1-11.1a1 1 0 0 0-1.4-1.4l-11.1 11.1c-1.6-3.4-1.6-6.8 0.1-9.7 2.8-4.6 9.3-7.1 17.7-6.8 0.3 8.4-2.2 14.9-6.7 17.8Z"/>
</svg>

Expected downloaded file content:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 32 32" width="32" height="32" stroke="currentColor" fill="currentColor">
<path d="M28 4.9a1 1 0 0 0-0.9-0.9C17.5 3.4 9.9 6.3 6.6 11.7a10.9 10.9 0 0 0-1.6 6.1c0.1 2 0.7 4 1.8 6l-2.5 2.5a1 1 0 0 0 0 1.4 1 1 0 0 0 1.4 0L8.2 25.3c2 1.1 4 1.6 6 1.7h0.4a10.9 10.9 0 0 0 5.7-1.6c5.4-3.3 8.3-10.9 7.7-20.5Zm-8.7 18.8c-2.9 1.7-6.2 1.8-9.7 0.1l11.1-11.1a1 1 0 0 0-1.4-1.4l-11.1 11.1c-1.6-3.4-1.6-6.8 0.1-9.7 2.8-4.6 9.3-7.1 17.7-6.8 0.3 8.4-2.2 14.9-6.7 17.8Z"/>
</svg>
aykutkardas commented 1 year ago

You're right about that. Do you want to create a PR for it?

zehraworks commented 1 year ago

Okay, I can handle this.