|Subject:||MIME::Parser::Filer evil_filename suggestions|
First of all, this module is great. Thanks for taking the time to write and maintain it. I've been using it for years without any modifications, and just this week I've made two that I thought would be useful for most people so I wanted to share them. 1. I got an attachment yesterday with this header: Content-Type: text/html; charset="us-ascii"; name=" " Content-Transfer-Encoding: quoted-printable The all-whitespace (but non-empty) name attribute generated a write-open error. I added a check for this in evil_filename to solve the problem. I also added a default filename for this case in exorcise_filename, but that's not language independent so I don't think you'd want to include it. 2. I often get attachments that are the saved "view source" output of internet explorer, which for some reason defaults to a name like "index.html". exorcise_filename changes this to ".html". I changed it to turn [ and ] into underscores, which gives a much more useful filename.