You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is problematic in cases where the svg qrcodes are inlined in a single html document rather than saved as standalone files. Usually this will not break anything, but it may cause annoyances if the output is fed to a tool that attempts to validate the html that contains the qrcodes.
E.g. I am producing an html file with several qrcodes in it, which I then feed to weasyprint to convert to pdf. I get one warning for each subsequent qrcode:
[2024-10-28 21:21:20 WARNING weasyprint/css/targets.py:94] Anchor defined twice: 'qr-path'
I am not sure if there is a use-case for hardcoding an id there, or even for having an id at all. The path element looks easily selectable using a number of DOM selectors, so id="qr-path" can probably go?
The text was updated successfully, but these errors were encountered:
m000
changed the title
Element identifier used by SvgPathImage should not be fixed
Element identifier used by SvgPathImage should not be hardcoded
Oct 28, 2024
SvgPathImage.process()
uses the hardcoded element idqr-path
for the produced svg path:https://github.com/lincolnloop/python-qrcode/blame/456b01d41f16e0cfb0f70c687848e276b78c3e8a/qrcode/image/svg.py#L149-L159
This is problematic in cases where the svg qrcodes are inlined in a single html document rather than saved as standalone files. Usually this will not break anything, but it may cause annoyances if the output is fed to a tool that attempts to validate the html that contains the qrcodes.
E.g. I am producing an html file with several qrcodes in it, which I then feed to weasyprint to convert to pdf. I get one warning for each subsequent qrcode:
[2024-10-28 21:21:20 WARNING weasyprint/css/targets.py:94] Anchor defined twice: 'qr-path'
I am not sure if there is a use-case for hardcoding an id there, or even for having an id at all. The path element looks easily selectable using a number of DOM selectors, so
id="qr-path"
can probably go?The text was updated successfully, but these errors were encountered: