rg3/youtube-dl — pull request #502 by FiloSottile (2012-10-28 21:53:21+00:00)
Title: My sanitize_filename proposal

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 `-`