contact: fix quoting

Ensure that addresses with commas are quoted. Don't 2047-encode though.

Update tests.
This commit is contained in:
Dirk-Jan C. Binnema
2023-03-14 06:18:56 +02:00
parent 46746bacf8
commit 96e16034c7
4 changed files with 18 additions and 23 deletions

View File

@ -225,7 +225,7 @@ output_json(ItemType itype, OptContact contact, const Options& opts)
" \"frequency\" : %zu\n",
contact->email.c_str(),
name.c_str(),
Mu::quote(contact->display_name(true)).c_str(),
Mu::quote(contact->display_name()).c_str(),
contact->message_date,
time_to_string("%FT%TZ", contact->message_date, true/*utc*/).c_str(),
contact->personal ? "true" : "false",