Subject: Re: [sup-devel] [PATCH] Re: [sup-talk] Bug reading/writing contacts with \" in them

From: Hamish Downer <[email-masked]>
Date: Mon, 20 Jun 2011 23:45:43 +0100

Excerpts from Michael Stapelberg's message of Mon Jan 24 18:20:13 +0000 2011:
> Excerpts from Ico's message of 2011-01-24 06:20:47 +0100:
> > The problem occurs when contacts have a certain combination of backslashes and
> > quotes in them. 
> > 
> >   somename: \"Some, Name\" <[email-masked]>
> 
> Attached is a patch which fixes the issue. Input like "Rob, Post\" will first
> be turned into "Rob, Post\\" when initially escaping, but will then stay "Rob,
> Post\\" (no more exploding backslashes).

Another patch that slipped through the net. Now applied to next.

Hamish

-- 
Hamish Downer <[email-masked]>

Web: http://www.foobacca.co.uk/
GPG: B7C48416
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Michael Stapelberg <[email-masked]>
Date: Mon, 24 Jan 2011 19:20:13 +0100

Hi Ico,

Excerpts from Ico's message of 2011-01-24 06:20:47 +0100:
> quotes in them. I 'imported' my mutt aliases with a simple script converting
> the format (too bad it is *almost* the same but not quite), and one of the
> contacts looked like this:
> 
As discussed on IRC, I’ve made the following findings:

 • Some combinations of email addresses (phrase + addr-spec in RFC822
   terminology) need to be escaped, for example when they contain a comma or a
   quote.
 • This escaping happens in Person#full_address by using @name.inspect
 • Person#full_address also is used when saving contacts back to contacts.txt
 • Person#initialize partly strips the quotes (line 10/11), but does not handle
   backslashes.

Best regards,
Michael