Skip to content

Commit

Permalink
Merge pull request #1294 from lrbn86/master
Browse files Browse the repository at this point in the history
Sanitize the playlist name
  • Loading branch information
jagrosh authored Feb 14, 2023
2 parents b76f6fa + 354a0b3 commit bbed9e8
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public MakelistCmd()
protected void execute(CommandEvent event)
{
String pname = event.getArgs().replaceAll("\\s+", "_");
pname = pname.replaceAll("[*?|\\/\":<>]", "");
if(pname == null || pname.isEmpty())
{
event.replyError("Please provide a name for the playlist!");
Expand Down

0 comments on commit bbed9e8

Please sign in to comment.