fix "first character of the attachment name was missing"
This commit is contained in:
parent
dce312c33e
commit
3a6b4b3a90
@ -65,7 +65,7 @@ const string Attachment::ALTERNATIVE ("alternative");
|
|||||||
const string Attachment::KAZ_ATTACH_NAME ("vos-pieces-jointes-kaz-ici.htm");
|
const string Attachment::KAZ_ATTACH_NAME ("vos-pieces-jointes-kaz-ici.htm");
|
||||||
const string Attachment::MULTIPART ("multipart/");
|
const string Attachment::MULTIPART ("multipart/");
|
||||||
|
|
||||||
const regex Attachment::nameCharsetRegEx (".*name\\*=\\s*([; \t]*)");
|
const regex Attachment::nameCharsetRegEx ( ".*name\\*=\\s*([; \t]*)");
|
||||||
const regex Attachment::nameRegEx ( ".*name=\\s*((\"(\\\\.|[^\\\\])*\")|[^; \t]*).*");
|
const regex Attachment::nameRegEx ( ".*name=\\s*((\"(\\\\.|[^\\\\])*\")|[^; \t]*).*");
|
||||||
const regex Attachment::boundaryRegEx (".*boundary=\\s*((\"(\\\\.|[^\\\\])*\")|[^; \t]*).*");
|
const regex Attachment::boundaryRegEx (".*boundary=\\s*((\"(\\\\.|[^\\\\])*\")|[^; \t]*).*");
|
||||||
const regex Attachment::cidDefRegEx (".*<([^>]*)>.*");
|
const regex Attachment::cidDefRegEx (".*<([^>]*)>.*");
|
||||||
|
@ -349,7 +349,7 @@ MainAttachment::extractLinks (const string &extractedPlainKAZ) {
|
|||||||
string name;
|
string name;
|
||||||
|
|
||||||
if (startName != string::npos) {
|
if (startName != string::npos) {
|
||||||
name = string (extractedPlainKAZ, startName+3, stopName - startName - 3);
|
name = string (extractedPlainKAZ, startName+2, stopName -startName-2);
|
||||||
// skip [> \r\n\t]
|
// skip [> \r\n\t]
|
||||||
string::size_type nextPos = name.find_first_not_of ("[>< \t\r\n\"]");
|
string::size_type nextPos = name.find_first_not_of ("[>< \t\r\n\"]");
|
||||||
if (nextPos != string::npos)
|
if (nextPos != string::npos)
|
||||||
|
Loading…
Reference in New Issue
Block a user