Skip to content

svg+html: better handling for comments #689

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

svg+html: better handling for comments #689

merged 1 commit into from
Jul 21, 2025

Conversation

gabriel-vasile
Copy link
Owner

In #193 HTML documents starting with a comment were not detected anymore.
This is against mime sniffing standard https://mimesniff.spec.whatwg.org/ but at the time it seemed best solution. file(1) also detects comments as HTML.

This commit makes SVG detection skip optional comments and HTML back to detecting those as valid documents.

In #193 HTML documents starting with a comment were not detected anymore.
This is against mime sniffing standard https://mimesniff.spec.whatwg.org/,
but at the time it seemed best solution. file(1) also detects comments as HTML.

This commit makes SVG detection skip optional comments and HTML back to
detecting those as valid documents.
@gabriel-vasile gabriel-vasile marked this pull request as ready for review July 21, 2025 09:03
@gabriel-vasile gabriel-vasile merged commit 1636be6 into master Jul 21, 2025
4 of 5 checks passed
@gabriel-vasile gabriel-vasile deleted the svg branch July 21, 2025 09:03
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.

1 participant