2012-12-15 [paul] 3.9.0cvs48
[claws.git] / src / addrselect.c
index ffdb511e60263cd10363a9c49b7968bb353dc2e5..8d967cf61f958a57a57f48fe11596f9f2281e287 100644 (file)
@@ -231,8 +231,11 @@ static gchar *addrselect_format_address( AddrItemObject * aio ) {
                }
        }
        if( address ) {
-               if( name ) {
-                       buf = g_strdup_printf( "%s <%s>", name, address );
+               if( name && name[0] != '\0' ) {
+                       if( strchr_with_skip_quote( name, '"', ',' ) )
+                               buf = g_strdup_printf( "\"%s\" <%s>", name, address );
+                       else
+                               buf = g_strdup_printf( "%s <%s>", name, address );
                }
                else {
                        buf = g_strdup( address );