Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect SVGs that do not start with a header #749

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Conversation

jcjgraf
Copy link
Contributor

@jcjgraf jcjgraf commented Dec 5, 2023

Indeed, there are (actually many) SVGs that do not start with a <? header but simply <svg. I have added detection for them.Though, I still did not manage to find documentation on all possible header of SVG files. What when the <svg line is preceded by a comment line? file detects such SVGs as HTML.

@infinitewhileloop Thanks for reporting and the submission of the sample.

fixes #748

@karlch
Copy link
Owner

karlch commented Dec 5, 2023

Awesome, thanks a lot for looking into this and fixing the issue!

The lack of a standard does seem annoying, and I guess there really is nothing we can do about this if even file does not identify some "valid" svg files correctly.
As long as we get a good amount I guess we are fine 😊

@karlch karlch merged commit 4352b4e into karlch:master Dec 5, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some SVG files are not detected
2 participants