fix quoteted attach filename
This commit is contained in:
		@@ -65,7 +65,7 @@ const string Attachment::KAZ_ATTACH_NAME		(".---KazAttachment---.html");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const regex Attachment::nameCharsetRegEx		(".*name\\*=(.*)");
 | 
			
		||||
const regex Attachment::nameRegEx			(".*name=\"([^\"]*)\".*");
 | 
			
		||||
const regex Attachment::nameRegEx			(".*name=\\s*\"?(.*)\"?\\s*;?\\s*");
 | 
			
		||||
// boundary="----=_Part_796779_1154936629.1668080348646"
 | 
			
		||||
// boundary="------------040709000505010508040808"
 | 
			
		||||
// boundary="----------=_1668606031-941125-91"
 | 
			
		||||
 
 | 
			
		||||
@@ -257,7 +257,7 @@ MainAttachment::getDisclaim (string &plain, string &html) const {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  plain = "\r\n"+KAZ_PLAIN_START+"\r\n"+KAZ_PLAIN_HR+"\r\n"+KAZ_PLAIN_DONT_TOUCH+"\r\n\r\n"+KAZ_PLAIN_WARNING+"\r\n\r\n"+KAZ_PLAIN_DOWLOAD_ONE+"\r\n"+plainNewLinks;
 | 
			
		||||
  plain = "\r\n"+KAZ_PLAIN_START+"\r\n"+KAZ_PLAIN_HR+"\r\n"+KAZ_PLAIN_DONT_TOUCH+"\r\n\r\n"+KAZ_PLAIN_DOWLOAD_ONE+"\r\n"+plainNewLinks;
 | 
			
		||||
  html = templateHtmlHeader+htmlNewLinks;
 | 
			
		||||
  if (previousLinks.size ()) {
 | 
			
		||||
    plain += "\r\n"+KAZ_PLAIN_DOWLOAD_OTHER+"\r\n"+plainOldLinks;
 | 
			
		||||
@@ -272,7 +272,7 @@ MainAttachment::getDisclaim (string &plain, string &html) const {
 | 
			
		||||
    html += allHtmlLinks;
 | 
			
		||||
  }
 | 
			
		||||
  html += templateHtmlFooter+"\r\n";
 | 
			
		||||
  plain += "\r\n\r\n"+KAZ_WEB_SITE+"\r\n"+KAZ_PLAIN_HR+"\r\n"+KAZ_PLAIN_STOP+"\r\n";
 | 
			
		||||
  plain += "\r\n\r\n"+KAZ_WEB_SITE+"\r\n\r\n"+KAZ_PLAIN_WARNING+"\r\n"+KAZ_PLAIN_HR+"\r\n"+KAZ_PLAIN_STOP+"\r\n";
 | 
			
		||||
  // & => & done
 | 
			
		||||
  LOG ("plain: " << plain);
 | 
			
		||||
  LOG ("html: " << html);
 | 
			
		||||
@@ -685,6 +685,7 @@ MainAttachment::substitute (ifstream &mbox, ofstream &outbox, const SizeArg &min
 | 
			
		||||
    curPos = attachP->endPos;
 | 
			
		||||
  }
 | 
			
		||||
  if (plainDisclaim.size () && (attachMode & ATTACHMENT)) {
 | 
			
		||||
    // XXX si pas de multipart
 | 
			
		||||
    LOG ("Add kaz attachment");
 | 
			
		||||
    LOG_BUG (boundary.empty () || ! subAttachements.size (), /**/, "eMailShrinker: can't add Kaz attachment M10: : " << *this);
 | 
			
		||||
    streamoff lastPos = subAttachements.back ().endPos;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user