From d8286ee396fa04335d900f6c65703fc7a528242b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 24 Aug 2019 12:55:55 +0200 Subject: urlencode doesn't like single strings ... --- talerblog/blog/blog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py index e35dd0e..5f7d578 100644 --- a/talerblog/blog/blog.py +++ b/talerblog/blog/blog.py @@ -17,6 +17,7 @@ # @author Marcello Stanisci # @brief Implementation of a Taler-compatible blog. +import urllib.parse from urllib.parse import urljoin, quote, urlencode import logging import os @@ -335,7 +336,7 @@ def article(article_name, data=None): "X-Taler-Resource-Url": resource_url, } - qrcode_data = "talerpay:" + urlencode(contract_url) + ";" + session_id + qrcode_data = "talerpay:" + urllib.parse.quote_plus(contract_url) + ";" + session_id qrcode_svg = get_qrcode_svg(qrcode_data) content = flask.render_template("templates/request_payment.html", article_name=article_name, -- cgit v1.2.3