1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Filter another invalid mediawiki page title character

This commit is contained in:
Ciaran Gultnieks 2018-04-11 14:32:55 +01:00
parent 33c6d5570e
commit bd00b87e4e

View File

@ -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,