Skip to content

Commit ac2dda2

Browse files
committed
Do not set element id for path generated by SvgPathImage #385
Squashed commit of the following: commit 6001967c18fd334279f2712cffe94ba4018ca227 Author: Martin Mahner <[email protected]> Date: Wed Jul 23 13:31:36 2025 +0200 Updated changelog commit 7d5d3b208c8be1e5190c812dd25712cab21dedf7 Merge: 4d3636c 4395902 Author: Martin Mahner <[email protected]> Date: Wed Jul 23 13:29:00 2025 +0200 Merge branch 'main' into remove-svg-id commit 4d3636c Author: Manolis Stamatogiannakis <[email protected]> Date: Mon Oct 28 22:55:31 2024 +0100 Do not set element id for path generated by SvgPathImage The element id used is hardcoded, which may cause issues when inlining many qr codes in a single document.
1 parent 4395902 commit ac2dda2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ WIP
66
===
77

88
- Added ``GappedCircleModuleDrawer`` (PIL) to render QR code modules as non-contiguous circles. (BenwestGate in `#373`_)
9+
- Removed the hardcoded 'id' argument from SVG elements. The fixed element ID caused conflicts when embedding multiple QR codes in a single document. (m000 in `#385`_)
910
- Improved test coveraged (akx in `#315`_)
1011
- Fixed typos in code that used ``embeded`` instead of ``embedded``. For backwards compatibility, the misspelled parameter names are still accepted but now emit deprecation warnings. These deprecated parameter names will be removed in v9.0. (benjnicholls in `#349`_)
1112
- Migrate pyproject.toml to PEP 621-compliant [project] metadata format. (hroncok in `#399`_)
@@ -18,6 +19,7 @@ WIP
1819
.. _#315: https://github.com/lincolnloop/python-qrcode/pull/315
1920
.. _#349: https://github.com/lincolnloop/python-qrcode/pull/349
2021
.. _#373: https://github.com/lincolnloop/python-qrcode/pull/373
22+
.. _#385: https://github.com/lincolnloop/python-qrcode/pull/385
2123
.. _#399: https://github.com/lincolnloop/python-qrcode/pull/399
2224
.. _#400: https://github.com/lincolnloop/python-qrcode/pull/400
2325

qrcode/image/svg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ def process(self):
158158
self.path = ET.Element(
159159
ET.QName("path"), # type: ignore
160160
d="".join(self._subpaths),
161-
id="qr-path",
162161
**self.QR_PATH_STYLE,
163162
)
164163
self._subpaths = []

0 commit comments

Comments
 (0)