Cleanup filename before saving it to avoid mismatch filename

This commit is contained in:
Hadi Nategh 2020-01-06 15:48:02 +01:00
parent 2fca02a3c8
commit e8b3372d43

View File

@ -3047,7 +3047,7 @@ app.classes.mail = AppJS.extend(
subject = this.et2.getArrayMgr('content').getEntry('mail_displaysubject'); subject = this.et2.getArrayMgr('content').getEntry('mail_displaysubject');
} }
// Replace these now, they really cause problems later // Replace these now, they really cause problems later
var filename = subject ? subject.replace(/[\f\n\t\v\/\\\?]/g,"_") : 'unknown'; var filename = subject ? subject.replace(/[\f\n\t\v\x0b\:*#?<>%"\/\\\?]/g,"_") : 'unknown';
ids.push(_id); ids.push(_id);
names.push(filename+'.eml'); names.push(filename+'.eml');
} }