fix url encoding in player names

This commit is contained in:
Maximilian Keßler 2023-12-28 12:25:12 +01:00
parent 38530ee303
commit 4b3c4eb3cf
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -30,7 +30,7 @@ class PlayerEntry:
@property @property
def player_name_encoded(self): def player_name_encoded(self):
return urllib.parse.quote_plus(self.player_name) return urllib.parse.quote(self.player_name)
@dataclass @dataclass
@ -659,7 +659,7 @@ def render_player_pages(env: jinja2.Environment, out_dir: Path):
player_games=games_grouped_by_player.get(player_name, []) player_games=games_grouped_by_player.get(player_name, [])
) )
output_file = out_dir / 'player' / urllib.parse.quote_plus(player_name) / 'index.html' output_file = out_dir / 'player' / player_name / 'index.html'
output_file.parent.mkdir(exist_ok=True, parents=True) output_file.parent.mkdir(exist_ok=True, parents=True)
with open(output_file, 'w') as f: with open(output_file, 'w') as f: