Updating branch refs/heads/master
         to 842120623a8a6679af9e0bd2282845de88c6c941 (commit)
       from 745defc61f990724b8f6afc66571e9e6158a543d (commit)

commit 842120623a8a6679af9e0bd2282845de88c6c941
Author: Christian Dywan <[email protected]>
Date:   Wed Mar 2 23:44:00 2011 +0100

    Handle quotes as part of names

 postler/postler-messages.vala |    1 +
 tests/parsing.vala            |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index 487266c..a1d9510 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -451,6 +451,7 @@ public class Postler.Messages : Gtk.TreeView {
         /* Remove double or single quotes around the name */
         long first = address.has_prefix ("'") || address.has_prefix ("\"") ? 1 
: 0;
         return { address.substring (first, lower - 1)
+            .replace ("\\\"", "`")
             .replace ("' ", "").replace ("\"", "").chomp (), recipient };
     }
 
diff --git a/tests/parsing.vala b/tests/parsing.vala
index b93ae01..c1a66b4 100644
--- a/tests/parsing.vala
+++ b/tests/parsing.vala
@@ -68,6 +68,7 @@ const TestCase[] addresses = {
     { "\"Klaus\" <[email protected]>", "Klaus [email protected]" },
     { "Bert O'Brian <[email protected]>", "Bert O'Brian [email protected]" },
     { "\"gtk+\" (b.g.o) <[email protected]>", "gtk+ (b.g.o) [email protected]" },
+    { "\"S \\\"T\\\" D\" <[email protected]>", "S `T` D [email protected]" },
     { "=?iso-8859-1?Q?M=2C_Alf?= <[email protected]>",
       "=?iso-8859-1?Q?M=2C_Alf?= [email protected]" }
 };
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to