Skip to content
Snippets Groups Projects
Commit e48585cb authored by Julian's avatar Julian
Browse files

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.
parent 31c38e77
No related branches found
No related tags found
No related merge requests found
Pipeline #7327 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment