summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-12-14 13:00:24 -0800
committerMark Wells <mark@freeside.biz>2016-12-14 13:41:58 -0800
commitc74a93a8460dc0e867e93a5ded0c63a1585b86c9 (patch)
treef8b4ad3cb3e8149086f14c73b9b154fc898565c0 /httemplate
parented39371920249d4ce54bdaaf1f67b60fab2df834 (diff)
fix parsing of multiple To: addresses, #73241
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/search/cust_msg.html5
-rwxr-xr-xhttemplate/view/cust_msg.html4
2 files changed, 7 insertions, 2 deletions
diff --git a/httemplate/search/cust_msg.html b/httemplate/search/cust_msg.html
index 33e1815c6..65460f7b9 100644
--- a/httemplate/search/cust_msg.html
+++ b/httemplate/search/cust_msg.html
@@ -19,7 +19,10 @@
ucfirst($_[0]->msgtype) || $_[0]->msgname
},
sub {
- join('<BR>', split(/,\s*/, $_[0]->env_to) )
+ join('<BR>',
+ map { encode_entities($_->format) }
+ Email::Address->parse($_[0]->env_to)
+ )
},
'status',
sub { encode_entities($_[0]->error) },
diff --git a/httemplate/view/cust_msg.html b/httemplate/view/cust_msg.html
index 91a08ebda..d2b043c92 100755
--- a/httemplate/view/cust_msg.html
+++ b/httemplate/view/cust_msg.html
@@ -61,7 +61,9 @@ $custmsgnum =~ /^(\d+)$/ or die "illegal custmsgnum";
my $cust_msg = qsearchs('cust_msg', { 'custmsgnum' => $custmsgnum });
my $date = '';
$date = time2str('%Y-%m-%d %T', $cust_msg->_date) if ( $cust_msg->_date );
-my $env_to = join('</TD></TR><TR><TD></TD><TD>', split(',', $cust_msg->env_to));
+my @to = map { encode_entities($_->format) }
+ Email::Address->parse($cust_msg->env_to);
+my $env_to = join('</TD></TR><TR><TD></TD><TD>', @to);
my %label = (
'sent' => 'Sent:',