Browse Source

melib/email/address: quote display_name if it contains ","

master
Manos Pitsidianakis 1 month ago
parent
commit
37d0846195
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 2
      melib/src/email/address.rs

2
melib/src/email/address.rs

@ -325,7 +325,7 @@ impl core::fmt::Display for Address {
match self {
Address::Mailbox(m) if m.display_name.length > 0 => {
match m.display_name.display(&m.raw) {
d if d.contains(".") => {
d if d.contains(".") || d.contains(",") => {
write!(f, "\"{}\" <{}>", d, m.address_spec.display(&m.raw))
}
d => write!(f, "{} <{}>", d, m.address_spec.display(&m.raw)),

Loading…
Cancel
Save