Bug 4141

Summary: To: column content not correctly preparing addresses...
Product: Claws Mail (GTK 2) Reporter: Paul Rolland <rol>
Component: UI/Message ListAssignee: users
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 3.17.2   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
screen capture showing what I have on screen.... none

Description Paul Rolland 2018-12-26 11:15:10 UTC
Hello,

This is not only related to 3.17.2, it has been there for quite a long time, maybe forever... 
My setup includes the "From" and the "To" columns in the message list, but there are some annoying behavior of the "To" content : 

1 - if the To: recipients are listed on two (or more) lines, the extra lines are starting with multiple spaces, but these are not reduced to a single space for display, resulting in extra space in the column,

2 - Some magic processing occurs on the adresses, and sometimes results in an empty string returned. This is occuring when you have :
To: <user@domain.tld>

These two are shown in the attached images.

I'm ready to cook a patch if someone tells me where to look at... I've tried (very quickly) to find something in src/common/utils.c, looking at eliminate_address_comment(), extract_address(), but they seem to be called only for the From: addresses...
Comment 1 Paul Rolland 2018-12-26 11:16:34 UTC
Created attachment 1946 [details]
screen capture showing what I have on screen....
Comment 2 Paul 2019-01-04 14:19:07 UTC
I am not able to reproduce this. Can you send one or two examples directly to me using 'forward as attachment', please?
Comment 3 Paul 2019-01-04 16:05:47 UTC
Thanks for the example mail. I can now see what you describe.

The problem is that claws-mail expects a single entry, and also does not strip any leading/trailing whitespace between multiple entries.
Comment 4 Paul Rolland 2019-01-04 16:28:44 UTC
Nice we now have a common view ;)

I think you only commented one part of what I consider as the problem:
 - "does not strip any leading/trailing whitespace between multiple entries"
   This is one problem, and applying something like the perl re: s/  +/ /g
   could fix that first problem.

 - the second problem is that if the To: is only formatted with a
   To: <user@domain>
   and no "comment"
   then this is totally removed, and nothing is shown.

But I'm OK to cook something... if someone gives me some pointers to look at ;)