From c11839cd5e58773b8259e1c8475ade299f273dae Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 31 May 2016 15:34:48 -0400 Subject: [PATCH] Improve handling of attachments names with quotes Partially resolves #2272 --- UI/MailerUI/UIxMailEditor.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index 39684a935..7ef694b10 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -523,10 +523,9 @@ static NSArray *infoKeys = nil; if (!attachedFiles) attachedFiles = [NSMutableArray new]; - newFilename = filename; - - baseFilename = [filename stringByDeletingPathExtension]; - extension = [filename pathExtension]; + newFilename = [filename stringByReplacingOccurrencesOfString:@"\\\"" withString:@"\""]; /* to real filename */ + baseFilename = [newFilename stringByDeletingPathExtension]; + extension = [newFilename pathExtension]; variation = 0; while ([attachedFiles containsObject: newFilename]) {