lkml.org 
[lkml]   [2010]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 3/3] get_maintainer: quote email address with period
Picky mail systems won't accept email addresses where recipient
has period in name; ie. David S. Miller <davemloft.net> will not work.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/scripts/get_maintainer.pl 2010-02-18 22:57:00.614708380 -0800
+++ b/scripts/get_maintainer.pl 2010-02-18 22:57:00.634708417 -0800
@@ -551,7 +551,7 @@ sub parse_email {
$name =~ s/^\"|\"$//g;
$address =~ s/^\s+|\s+$//g;

- if ($name =~ /[^a-z0-9 \.\-]/i) { ##has "must quote" chars
+ if ($name =~ /[^\w \-]/i) { ##has "must quote" chars
$name =~ s/(?<!\\)"/\\"/g; ##escape quotes
$name = "\"$name\"";
}
@@ -568,7 +568,7 @@ sub format_email {
$name =~ s/^\"|\"$//g;
$address =~ s/^\s+|\s+$//g;

- if ($name =~ /[^a-z0-9 \.\-]/i) { ##has "must quote" chars
+ if ($name =~ /[^\w \-]/i) { ##has "must quote" chars
$name =~ s/(?<!\\)"/\\"/g; ##escape quotes
$name = "\"$name\"";
}
--



\
 
 \ /
  Last update: 2010-02-19 08:05    [W:3.128 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site