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

usvg fails to parse SVGs if xmlns attribute is missing #847

Open
nicoburns opened this issue Nov 15, 2024 · 1 comment
Open

usvg fails to parse SVGs if xmlns attribute is missing #847

nicoburns opened this issue Nov 15, 2024 · 1 comment
Labels

Comments

@nicoburns
Copy link

usvg will currently fail to parse otherwise valid SVGs is the xmlns attribute is missing. This is the correct behaviour for standalone SVG files, but not correct for "inline SVGs" embedded within HTML documents.

As such, I would like to propose that an option is added to usvg::Options that determines whether the namespace should check is enabled.

I would be able to create a PR for this.

@nicoburns nicoburns added the usvg label Nov 15, 2024
@RazrFalcon
Copy link
Collaborator

Are you sure this is the correct behaviour? Browsers would not open such files. Meanwhile Inkscape, librsvg and QtSvg are fine.
And I'm not sure how easy it would be to implement this. Adding an option is definitely not the way. It should be handled automatically.

Overall, it's a super rare edge case we can simply ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants