std::string temp=mime.GetFieldValue("References");\r
// remove any path folding\r
temp=StringFunctions::Replace(temp,"\r\n","");\r
- temp=StringFunctions::Replace(temp,"\t","");\r
+ temp=StringFunctions::Replace(temp,"\t"," ");\r
std::vector<std::string> parts;\r
int count=0;\r
StringFunctions::SplitMultiple(temp,", \t",parts);\r
for(std::vector<std::string>::reverse_iterator i=parts.rbegin(); i!=parts.rend(); i++)\r
{\r
- // get rid of < and > and any whitespace\r
- (*i)=StringFunctions::Replace((*i),"<","");\r
- (*i)=StringFunctions::Replace((*i),">","");\r
- (*i)=StringFunctions::TrimWhitespace((*i));\r
- /*\r
- // erase @ and everything after\r
- if((*i).find("@")!=std::string::npos)\r
+ if((*i).size()>2)\r
{\r
- (*i).erase((*i).find("@"));\r
- }\r
- */\r
- // only erase after @ if message is old type with @freenetproject.org\r
- if((*i).find("@freenetproject.org")!=std::string::npos)\r
- {\r
- (*i).erase((*i).find("@"));\r
- }\r
- if((*i)!="")\r
- {\r
- m_inreplyto[count++]=(*i);\r
+ // get rid of < and > and any whitespace\r
+ (*i)=StringFunctions::Replace((*i),"<","");\r
+ (*i)=StringFunctions::Replace((*i),">","");\r
+ (*i)=StringFunctions::TrimWhitespace((*i));\r
+ /*\r
+ // erase @ and everything after\r
+ if((*i).find("@")!=std::string::npos)\r
+ {\r
+ (*i).erase((*i).find("@"));\r
+ }\r
+ */\r
+ // only erase after @ if message is old type with @freenetproject.org\r
+ if((*i).find("@freenetproject.org")!=std::string::npos)\r
+ {\r
+ (*i).erase((*i).find("@"));\r
+ }\r
+ if((*i)!="")\r
+ {\r
+ m_inreplyto[count++]=(*i);\r
+ }\r
}\r
}\r
}\r