diff options
author | Jeix <devnull@localhost> | 2010-10-02 20:06:09 +0200 |
---|---|---|
committer | Jeix <devnull@localhost> | 2010-10-02 20:06:09 +0200 |
commit | ebf957d0fbaa0d52ce248276eee755eff3b60092 (patch) | |
tree | cdf537743d4a47bf0a4c2a55b49159dd2581142c | |
parent | closed #140 (diff) | |
download | pyload-ebf957d0fbaa0d52ce248276eee755eff3b60092.tar.xz |
urlencode fix
-rwxr-xr-x | module/network/Request.py | 8 | ||||
-rw-r--r-- | module/web/ajax/views.py | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/module/network/Request.py b/module/network/Request.py index f322c847a..bbce37d6b 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -127,7 +127,7 @@ class Request: self.pycurl.setopt(pycurl.NOPROGRESS, 1) - url = str(url) + url = self.__myquote(str(url)) if post: if not no_post_encode: @@ -204,7 +204,7 @@ class Request: def download(self, url, file_name, folder, get={}, post={}, ref=True, cookies=True, no_post_encode=False): - url = str(url) + url = self.__myquote(str(url)) self.pycurl.setopt(pycurl.NOPROGRESS, 0) @@ -384,6 +384,10 @@ class Request: self.pycurl.close() except: pass + + def __myquote(self, url): + return urllib.quote(url, safe="%/:=&?~#+!$,;'@()*[]") + def getURL(url, get={}, post={}): """ diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py index 5e911e0ba..603bb993a 100644 --- a/module/web/ajax/views.py +++ b/module/web/ajax/views.py @@ -56,7 +56,7 @@ def add_package(request): queue = int(request.POST['add_dest']) - links = request.POST['add_links'].replace(" ", "\n").split("\n") + links = request.POST['add_links'].split("\n") try: f = request.FILES['add_file'] |