{"thread":{"id":"33910","subject":"[PATCH] git-send-email: another fix for special characters","startedAt":"2013-05-23T14:13:52Z","lastAt":"2013-05-23T14:13:52Z","messageCount":1,"participants":["Michael S. Tsirkin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"218264","messageId":"20130523141352.GA21462@redhat.com","threadId":"33910","inReplyTo":null,"subject":"[PATCH] git-send-email: another fix for special characters","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-05-23T14:13:52Z","receivedAt":"2013-05-23T14:13:52Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"When patch sender's name has special characters,\ngit send-email did not quote it before matching\nagainst the author name.\nAs a result suppress_cc = self did not work:\nsender is still Cc'd.\n\nFix by sanitizing before matching to patch author name.\n\nSigned-off-by: Michael S. Tsirkin <mst@redhat.com>\n---\n git-send-email.perl | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex c4dc438..a3fed7c 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1309,7 +1309,10 @@ foreach my $t (@files) {\n \t\t\telsif (/^From:\\s+(.*)$/i) {\n \t\t\t\t($author, $author_encoding) = unquote_rfc2047($1);\n \t\t\t\tnext if $suppress_cc{'author'};\n-\t\t\t\tnext if $suppress_cc{'self'} and $author eq $sender;\n+\t\t\t\tif ($suppress_cc{'self'}) {\n+                                    my $sanitized_sender = sanitize_address($sender);\n+                                    next if $author eq $sanitized_sender;\n+                                }\n \t\t\t\tprintf(\"(mbox) Adding cc: %s from line '%s'\\n\",\n \t\t\t\t\t$1, $_) unless $quiet;\n \t\t\t\tpush @cc, $1;\n-- \nMST\n"}]}