commit 46fe3dd185a0d68f9d8a7ec2ebdc135e7119639e
parent 5b3603f3e4fbb9f64c80c3f7c037ef2dc8ab0a36
Author: ThomasV <thomasv1@gmx.de>
Date: Mon, 25 Nov 2013 21:43:04 -0800
Merge pull request #462 from imrehg/posfix
pointofsale: generated bitcoin url might contain invalid characters
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/plugins/pointofsale.py b/plugins/pointofsale.py
@@ -1,6 +1,7 @@
import re
import platform
from decimal import Decimal
+from urllib import quote
from PyQt4.QtGui import *
from PyQt4.QtCore import *
@@ -89,9 +90,11 @@ class QR_Window(QWidget):
if self.amount is not None:
msg += '?amount=%s'%(str( self.amount))
if self.label is not None:
- msg += '&label=%s'%(self.label)
+ encoded_label = quote(self.label)
+ msg += '&label=%s'%(encoded_label)
elif self.label is not None:
- msg += '?label=%s'%(self.label)
+ encoded_label = quote(self.label)
+ msg += '?label=%s'%(encoded_label)
self.qrw.set_addr( msg )