Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My sanitize_filename proposal #502

Merged
merged 1 commit into from
Oct 28, 2012

Conversation

FiloSottile
Copy link
Collaborator

Ok, the old one was a dumb one. The new:

  • leave space and .
  • kill ? and control characters (ASCII < 32 and == 127)
  • replace " with '
  • replace : with space + -
  • replace \/|*<> with - (this is the one I am most uncertain on, but it seemed a good replacement for these characters)

Finally, kills any double or trailing -

@FiloSottile
Copy link
Collaborator Author

See #500 and #279

@phihag
Copy link
Contributor

phihag commented Oct 28, 2012

LGTM, merged with additional tests.

phihag added a commit that referenced this pull request Oct 28, 2012
@phihag phihag merged commit aeca861 into ytdl-org:master Oct 28, 2012
joedborg referenced this pull request in joedborg/youtube-dl Nov 17, 2020
[pull] master from ytdl-org:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants