I'm using SharpMimeTools and I am really happy with it. Really great job!
I noticed a small problem though - subjects got double quotes stripped from them. I believe all headers have it this way after looking at the SharpMimeTools.parserfc2047Header method:
That Replace call doesn't feel right. I think double quotes are a valid character in headers. To me it looks like a fix for some edge case. Anyone know more about it?
Best,
Hristo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just went ahead and did the change - removed the Replace() call above. The only thing I noticed is that sometimes parsed addresses will contain quotes in their display names (message.From for example). I dealt with that in my app by stripping quotes only for address display names. I know I should be probably doing something smarter like looking for escaped \" quotes, but stripping quotes suits my needs for now.
Best,
Hristo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
I'm using SharpMimeTools and I am really happy with it. Really great job!
I noticed a small problem though - subjects got double quotes stripped from them. I believe all headers have it this way after looking at the SharpMimeTools.parserfc2047Header method:
public static System.String parserfc2047Header ( System.String header ) {
header = header.Replace ("\"", System.String.Empty);
header = anmar.SharpMimeTools.SharpMimeTools.rfc2047decode(header);
return header;
}
That Replace call doesn't feel right. I think double quotes are a valid character in headers. To me it looks like a fix for some edge case. Anyone know more about it?
Best,
Hristo
I just went ahead and did the change - removed the Replace() call above. The only thing I noticed is that sometimes parsed addresses will contain quotes in their display names (message.From for example). I dealt with that in my app by stripping quotes only for address display names. I know I should be probably doing something smarter like looking for escaped \" quotes, but stripping quotes suits my needs for now.
Best,
Hristo