From b33cae375a1edbf879be13c9412b2cbe61fab040 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 10 Oct 2014 21:12:48 -0400 Subject: [PATCH] remove url-unsafe characters from "current version" symlink names This prevents the URL from having ugly %20 stuff in the app name. --- fdroidserver/update.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index b96d860e..0339f460 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -868,7 +868,9 @@ def make_index(apps, sortedids, apks, repodir, archive, categories): if current_version_file is not None \ and config['make_current_version_link'] \ and repodir == 'repo': # only create these - apklinkname = app[config['current_version_name_source']] + '.apk' + sanitized_name = re.sub('''[ '"&%?+=]''', '', + app[config['current_version_name_source']]) + apklinkname = sanitized_name + '.apk' current_version_path = os.path.join(repodir, current_version_file) if os.path.exists(apklinkname): os.remove(apklinkname) -- 2.30.2