1
0
mirror of https://github.com/git/git synced 2024-07-04 16:48:40 +00:00

send-email: is_rfc2047_quoted use qr// regexes

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2010-09-30 13:43:05 +00:00 committed by Junio C Hamano
parent 41ae8f1d6c
commit 49f73852c8

View File

@ -852,8 +852,8 @@ sub quote_rfc2047 {
sub is_rfc2047_quoted {
my $s = shift;
my $token = '[^][()<>@,;:"\/?.= \000-\037\177-\377]+';
my $encoded_text = '[!->@-~]+';
my $token = qr/[^][()<>@,;:"\/?.= \000-\037\177-\377]+/;
my $encoded_text = qr/[!->@-~]+/;
length($s) <= 75 &&
$s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
}