From e48585cbb9f359ecd379998fc8cfe76fd855e09a Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Wed, 11 Aug 2021 16:48:02 +0200
Subject: [PATCH] Fixed minor html validity error in qr code generation

The output of the "qrcode_svg" template filter emmitted a tag with a constant
id. When used multiple times in a single document (i.e. the invites list),
this leads to multiple elements sharing the same id value.
---
 uffd/template_helper.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uffd/template_helper.py b/uffd/template_helper.py
index ba973fb7..ed46b865 100644
--- a/uffd/template_helper.py
+++ b/uffd/template_helper.py
@@ -21,7 +21,7 @@ def register_template_helper(app):
 			svg.set(key, value)
 		buf = io.BytesIO()
 		img.save(buf)
-		return Markup(buf.getvalue().decode().replace('<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n', ''))
+		return Markup(buf.getvalue().decode().replace('<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n', '').replace(' id="qr-path" ', ' '))
 
 	@app.template_filter()
 	def datauri(data, mimetype='text/plain'): #pylint: disable=unused-variable
-- 
GitLab