summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/misc.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/misc.py')
-rw-r--r--module/plugins/internal/misc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/plugins/internal/misc.py b/module/plugins/internal/misc.py
index fb8071b49..db63d5ffc 100644
--- a/module/plugins/internal/misc.py
+++ b/module/plugins/internal/misc.py
@@ -468,8 +468,9 @@ def fixurl(url, unquote=None):
if unquote is None:
unquote = url is old
- url = html_unescape(decode(url).decode('unicode-escape'))
+ url = html_unescape(decode(url))
url = re.sub(r'(?<!:)/{2,}', '/', url).strip().lstrip('.')
+ url = encode(url)
if not unquote:
url = urllib.quote(url)
@@ -538,6 +539,7 @@ def parse_name(value, safechar=True):
url_p.netloc.split('.', 1)[0])
name = urllib.unquote(name)
+ name = decode(name)
return safename(name) if safechar else name