Skip to content

Commit

Permalink
Make ctfnote.sluggify also remove slashes
Browse files Browse the repository at this point in the history
(Hopefully) fixes #6 by removing slashes from the CTF name and elsewhere when using sluggify.
  • Loading branch information
RobinJadoul authored Aug 31, 2023
1 parent 000f3c9 commit 992a4a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions organizers_bot/ctfnote.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async def _update(self):
"description": self.desc,
"flag": self.flag,
})
await self.parent._fullupdate()
await self.parent._fullupdate()000f3c91

async def updateTitle(self, newtitle: str):
"""
Expand Down Expand Up @@ -579,7 +579,7 @@ def slugify(name:str):
npm package called slugify. We just do a best-effort approach here. If link generation fails
in the bot, players should just use the web interface.
"""
name = name.replace(" ", "-")
name = name.replace(" ", "-").replace("/", "")
return name

async def add_task(ctx: discord_slash.SlashContext, created, name: str,
Expand Down

0 comments on commit 992a4a1

Please sign in to comment.