-
Notifications
You must be signed in to change notification settings - Fork 682
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
Improper SVG result #353
Comments
Same issue with me... I'm now having to lock qrcode<7.4 in my project as I'm inlining the SVG. Hoping for a fix that doesn't require manipulation of the SVG string. |
Same issue with me. |
Finally had some free time to dig into this again:
SuggestionI tested a little bit around to find out where the root cause could be found. In the end I replaced https://github.com/lincolnloop/python-qrcode/blob/main/qrcode/image/styles/moduledrawers/svg.py#L93 with @SmileyChris Are there any important reasons to hold on to |
This issue is still present in version 8.0 |
I know, I hope @SmileyChris or any other active maintainer (@maribedran ?) may reply on my suggestion. |
I just stumbled over a bug, which seems to occur recently (> 7.3.1)
The resulting svg contains
<svg:rect>
instead of<rect>
elements, which are not interpreted properly by browsers. I tried to follow the code snippets provided on the documentation of 7.4.2, since I thought maybe my usage of the package is not suitable with recent versions, but it resulted in improper SVGs as well.For versions > 7.3.1 I found a workaround, which is not very smart but works:
The result can be interpreted by browsers properly. Resulting SVGs can be checked on validity using this nice tool: https://svg.enshrined.co.uk/
The text was updated successfully, but these errors were encountered: