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:
parent
41ae8f1d6c
commit
49f73852c8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user