summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/Plugin.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-11 17:48:35 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-13 13:38:06 +0200
commitc47e27ec99f5d6fd66d6c96340e9654bf916ce96 (patch)
tree1595ab60b46ff6b8f2f3eeadf4f0df84dd0fddf8 /module/plugins/internal/Plugin.py
parent[SimpleCrypter] Don't extend SimpleHoster anymore (diff)
downloadpyload-c47e27ec99f5d6fd66d6c96340e9654bf916ce96.tar.xz
Fixing fixurl...
Diffstat (limited to 'module/plugins/internal/Plugin.py')
-rw-r--r--module/plugins/internal/Plugin.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index c1b994d02..f5db49d8b 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -85,18 +85,19 @@ def exists(path):
def fixurl(url, unquote=None):
- newurl = urllib.unquote(url)
+ old = url
+ url = urllib.unquote(url)
if unquote is None:
- unquote = newurl == url
+ unquote = url is old
- newurl = html_unescape(decode(newurl).decode('unicode-escape'))
- newurl = re.sub(r'(?<!:)/{2,}', '/', newurl).strip().lstrip('.')
+ url = html_unescape(decode(url).decode('unicode-escape'))
+ url = re.sub(r'(?<!:)/{2,}', '/', url).strip().lstrip('.')
if not unquote:
- newurl = urllib.quote(newurl)
+ url = urllib.quote(url)
- return newurl
+ return url
def parse_name(string):