From: Hans-Christoph Steiner Date: Sat, 11 Oct 2014 01:12:48 +0000 (-0400) Subject: remove url-unsafe characters from "current version" symlink names X-Git-Tag: 0.3.0~21^2~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b33cae375a1edbf879be13c9412b2cbe61fab040;p=fdroidserver.git remove url-unsafe characters from "current version" symlink names This prevents the URL from having ugly %20 stuff in the app name. --- 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)