From bd00b87e4e43f120866737d4483a5a95d6edd4ee Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Wed, 11 Apr 2018 14:32:55 +0100 Subject: [PATCH] Filter another invalid mediawiki page title character --- fdroidserver/update.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 4c865d71..0d8a50fb 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -272,12 +272,9 @@ def update_wiki(apps, sortedids, apks): # Make a redirect from the name to the ID too, unless there's # already an existing page with the name and it isn't a redirect. noclobber = False - apppagename = app.Name.replace('_', ' ') - apppagename = apppagename.replace('{', '') - apppagename = apppagename.replace('}', ' ') - apppagename = apppagename.replace(':', ' ') - apppagename = apppagename.replace('[', ' ') - apppagename = apppagename.replace(']', ' ') + apppagename = app.Name + for ch in '_{}:[]|': + apppagename = apppagename.replace(ch, ' ') # Drop double spaces caused mostly by replacing ':' above apppagename = apppagename.replace(' ', ' ') for expagename in site.allpages(prefix=apppagename,