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:

committed by
Junio C Hamano

parent
41ae8f1d6c
commit
49f73852c8
@ -852,8 +852,8 @@ sub quote_rfc2047 {
|
|||||||
|
|
||||||
sub is_rfc2047_quoted {
|
sub is_rfc2047_quoted {
|
||||||
my $s = shift;
|
my $s = shift;
|
||||||
my $token = '[^][()<>@,;:"\/?.= \000-\037\177-\377]+';
|
my $token = qr/[^][()<>@,;:"\/?.= \000-\037\177-\377]+/;
|
||||||
my $encoded_text = '[!->@-~]+';
|
my $encoded_text = qr/[!->@-~]+/;
|
||||||
length($s) <= 75 &&
|
length($s) <= 75 &&
|
||||||
$s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
|
$s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user