diff --git a/setup.py b/setup.py index 69f1726..ff542a4 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup from setuptools import find_packages __author__ = 'Ryan McGrath ' -__version__ = '1.3.4' +__version__ = '1.3.5' setup( # Basic package information. diff --git a/twython/twython.py b/twython/twython.py index d1822ce..e5a3b3f 100644 --- a/twython/twython.py +++ b/twython/twython.py @@ -9,7 +9,7 @@ """ __author__ = "Ryan McGrath " -__version__ = "1.3.4" +__version__ = "1.3.5" import urllib import urllib2 @@ -210,7 +210,7 @@ class Twython(object): @staticmethod def constructApiURL(base_url, params): - return base_url + "?" + "&".join(["%s=%s" %(Twython.unicode2utf8(key), Twython.unicode2utf8(value)) for (key, value) in params.iteritems()]) + return base_url + "?" + "&".join(["%s=%s" %(Twython.unicode2utf8(key), urllib.quote_plus(Twython.unicode2utf8(value))) for (key, value) in params.iteritems()]) @staticmethod def shortenURL(url_to_shorten, shortener = "http://is.gd/api.php", query = "longurl"): diff --git a/twython3k/twython.py b/twython3k/twython.py index ee3f7ad..406dbc6 100644 --- a/twython3k/twython.py +++ b/twython3k/twython.py @@ -9,7 +9,7 @@ """ __author__ = "Ryan McGrath " -__version__ = "1.3.4" +__version__ = "1.3.5" import urllib.request, urllib.parse, urllib.error import urllib.request, urllib.error, urllib.parse @@ -210,7 +210,7 @@ class Twython(object): @staticmethod def constructApiURL(base_url, params): - return base_url + "?" + "&".join(["%s=%s" %(Twython.unicode2utf8(key), Twython.unicode2utf8(value)) for (key, value) in params.items()]) + return base_url + "?" + "&".join(["%s=%s" %(Twython.unicode2utf8(key), urllib.parse.quote_plus(Twython.unicode2utf8(value))) for (key, value) in params.items()]) @staticmethod def shortenURL(url_to_shorten, shortener = "http://is.gd/api.php", query = "longurl"):