commit f92c3cadf083c4e4aab325a076a01c5e7d5578f4
parent 217dc2f55b38c22c3bbaf3b42f03664419cfec50
Author: ThomasV <thomasv@gitorious>
Date: Wed, 25 Feb 2015 20:17:03 +0100
fix utf8 encode in create_URI
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/util.py b/lib/util.py
@@ -196,6 +196,8 @@ def create_URI(addr, amount, message):
if amount:
query.append('amount=%s'%format_satoshis(amount))
if message:
+ if type(message) == unicode:
+ message = message.encode('utf8')
query.append('message=%s'%urllib.quote(message))
p = urlparse.ParseResult(scheme='bitcoin', netloc='', path=addr, params='', query='&'.join(query), fragment='')
return urlparse.urlunparse(p)