From 085be22302278c341946a36765725f5100e4d82c Mon Sep 17 00:00:00 2001 From: Dooho Yi Date: Tue, 14 Sep 2021 01:29:33 +0900 Subject: [PATCH] urlencoding .. more changes --- distribusi/distribusi/distribusi.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/distribusi/distribusi/distribusi.py b/distribusi/distribusi/distribusi.py index 947ec90..179b88a 100644 --- a/distribusi/distribusi/distribusi.py +++ b/distribusi/distribusi/distribusi.py @@ -201,7 +201,7 @@ def render_dir(args, directory): print('Found file in dir ', name, 'as', mime) if type_ in FILE_TYPES: - a = FILE_TYPES[type_].format(relative_path, c, c) + a = FILE_TYPES[type_].format(quote(relative_path), c, c) # expansion for different kind of text files if type_ == 'text': @@ -222,14 +222,14 @@ def render_dir(args, directory): # a = FILE_TYPES[type_] if type_ == 'image': - a = FILE_TYPES[type_].format(relative_path, c, c) + a = FILE_TYPES[type_].format(quote(relative_path), c, c) if args.thumbnail: a = thumbnail(full_path, relative_path, args) if args.no_filenames: c = "" if args.captions: c = caption(relative_path) - a = FILE_TYPES[type_].format(relative_path, c, c) + a = FILE_TYPES[type_].format(quote(relative_path), c, c) # ALT 처리 alt_path = full_path + ".alt" if os.path.isfile(alt_path): @@ -240,7 +240,7 @@ def render_dir(args, directory): if not line: break alt = alt + line + ' ' - a = FILE_TYPES[type_].format(relative_path, alt, c) + a = FILE_TYPES[type_].format(quote(relative_path), alt, c) if subtype in SUB_TYPES: a = SUB_TYPES[subtype] @@ -314,7 +314,7 @@ def distribusify(args, directory, freg): # noqa if type_ in FILE_TYPES: - a = FILE_TYPES[type_].format(name, c, c) + a = FILE_TYPES[type_].format(quote(name), c, c) # expansion for different kind of text files if type_ == 'text': @@ -341,7 +341,7 @@ def distribusify(args, directory, freg): # noqa c = "" if args.captions: c = caption(full_path) - a = FILE_TYPES[type_].format(name, c, c) + a = FILE_TYPES[type_].format(quote(name), c, c) # ALT 처리 alt_path = full_path + ".alt" if os.path.isfile(alt_path): @@ -352,7 +352,7 @@ def distribusify(args, directory, freg): # noqa if not line: break alt = alt + line + ' ' - a = FILE_TYPES[type_].format(name, alt, c) + a = FILE_TYPES[type_].format(quote(name), alt, c) if subtype in SUB_TYPES: a = SUB_TYPES[subtype]