Merge pull request #462 from imrehg/posfix
pointofsale: generated bitcoin url might contain invalid characters
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import re
|
import re
|
||||||
import platform
|
import platform
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
from urllib import quote
|
||||||
|
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
from PyQt4.QtCore import *
|
from PyQt4.QtCore import *
|
||||||
@@ -89,9 +90,11 @@ class QR_Window(QWidget):
|
|||||||
if self.amount is not None:
|
if self.amount is not None:
|
||||||
msg += '?amount=%s'%(str( self.amount))
|
msg += '?amount=%s'%(str( self.amount))
|
||||||
if self.label is not None:
|
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:
|
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 )
|
self.qrw.set_addr( msg )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user