Handle attachments with spaces, etc. in file name

This commit is contained in:
Retro_Guy 2021-09-27 05:08:41 +00:00
parent 2d63ae75ae
commit 5332bbbdb9
1 changed files with 1 additions and 0 deletions

View File

@ -230,6 +230,7 @@ if ($type=="post") {
}
}
if(isset($_FILES["photo"]) && $_FILES["photo"]["error"] == 0) {
$_FILES[photo][name] = preg_replace('/[^a-zA-Z0-9\.]/', '_', $_FILES[photo][name]);
// There is an attachment to handle
$message=message_post_with_attachment(quoted_printable_encode($subject),
$nemail." (".quoted_printable_encode($name).")",