# HG changeset patch # User Goffi # Date 1499973816 -7200 # Node ID f9adda22a2e14256b74bbd85e547e2685fef2c84 # Parent dad500e7ae509aab3207954e329a770da5f28fef tools(common/uri): fixed encoding in buildXMPPUri diff -r dad500e7ae50 -r f9adda22a2e1 src/tools/common/uri.py --- a/src/tools/common/uri.py Thu Jul 13 21:13:35 2017 +0200 +++ b/src/tools/common/uri.py Thu Jul 13 21:23:36 2017 +0200 @@ -75,13 +75,13 @@ def addPairs(uri, pairs): for k,v in pairs.iteritems(): - uri.append(u';' + urllib.quote_plus(k) + u'=' + urllib.quote_plus(v)) + uri.append(u';' + urllib.quote_plus(k.encode('utf-8')) + u'=' + urllib.quote_plus(v.encode('utf-8'))) def buildXMPPUri(type_, **kwargs): uri = [u'xmpp:'] subtype = kwargs.pop('subtype', None) path = kwargs.pop('path') - uri.append(urllib.quote_plus(path).replace(u'%40', '@')) + uri.append(urllib.quote_plus(path.encode('utf-8')).replace(u'%40', '@')) if type_ == u'pubsub': if subtype == 'microblog' and not kwargs.get('node'):