Attachmentnamen (z.B. bei Emails): Weitere Sonderzeichen ( / und \ ) ersetzen, damit...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 31 Jan 2008 15:46:23 +0000 (15:46 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 31 Jan 2008 15:46:23 +0000 (15:46 +0000)
SL/Form.pm

index 8a12841..510e305 100644 (file)
@@ -1263,8 +1263,8 @@ sub generate_attachment_filename {
                                : $self->{format} =~ /opendocument/i ? ".odt"
                                : $self->{format} =~ /html/i         ? ".html"
                                :                                      "");
-    $attachment_filename =  lc $main::locale->quote_special_chars('filenames', $attachment_filename);
-    $attachment_filename =~ s/ /_/g;
+    $attachment_filename =  $main::locale->quote_special_chars('filenames', $attachment_filename);
+    $attachment_filename =~ s|[\s/\\]+|_|g;
   } else {
     $attachment_filename = "";
   }