git-send-email: add rfc2047 quoting for "=?"
authorKrzysztof Mazur <krzysiek@podlesie.net>
Wed, 24 Oct 2012 21:28:29 +0000 (23:28 +0200)
committerJeff King <peff@peff.net>
Thu, 25 Oct 2012 10:06:00 +0000 (06:06 -0400)
For raw subjects rfc2047 quoting is needed not only for non-ASCII characters,
but also for any possible rfc2047 in it.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Jeff King <peff@peff.net>
git-send-email.perl
index 1574675d1d5c0f057cac5bf0e139831495ab9565..5a7c29db9324df48c9da68b08a946e5a357f0a78 100755 (executable)
@@ -908,7 +908,7 @@ sub is_rfc2047_quoted {
 sub subject_needs_rfc2047_quoting {
        my $s = shift;
 
-       return ($s =~ /[^[:ascii:]]/);
+       return ($s =~ /[^[:ascii:]]/) || ($s =~ /=\?/);
 }
 
 sub quote_subject {