about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-21 01:23:03 +0000
committerEric Wong <e@80x24.org>2016-07-21 01:23:20 +0000
commitd42aa8d31212060e107951a64045ab0796d6a56c (patch)
tree5538a0415a2602cdd95327c86b514560c52eeca8 /lib
parent803914775816f7de5485fa397bad64e1bd404381 (diff)
downloadpublic-inbox-d42aa8d31212060e107951a64045ab0796d6a56c.tar.gz
Having long Cc: lines is inevitable for large threads
with many participants, and git-send-email only gained
the ability to recognize ',' in the "--cc" arg recently
with the release of git v2.6.0 in September 2015.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/View.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 5f99644f..e0d81f00 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -59,7 +59,7 @@ sub msg_reply {
 
         my ($arg, $link) = mailto_arg_link($hdr);
         push @$arg, '/path/to/YOUR_REPLY';
-        $arg = join(" \\\n    ", '', @$arg);
+        $arg = ascii_html(join(" \\\n    ", '', @$arg));
         <<EOF
 <hr><pre
 id=R><b>Reply instructions:</b>
@@ -619,15 +619,15 @@ sub mailto_arg_link {
         my $subj = $hdr->header('Subject') || '';
         $subj = "Re: $subj" unless $subj =~ /\bRe:/i;
         my $mid = $hdr->header_raw('Message-ID');
-        push @arg, '--in-reply-to='.ascii_html(squote_maybe(mid_clean($mid)));
+        push @arg, '--in-reply-to='.squote_maybe(mid_clean($mid));
         my $irt = uri_escape_utf8($mid);
         delete $cc{$to};
-        push @arg, '--to=' . ascii_html($to);
+        push @arg, "--to=$to";
         $to = uri_escape_utf8($to);
         $subj = uri_escape_utf8($subj);
-        my $cc = join(',', sort values %cc);
-        push @arg, '--cc=' . ascii_html($cc);
-        $cc = uri_escape_utf8($cc);
+        my @cc = sort values %cc;
+        push(@arg, map { "--cc=$_" } @cc);
+        my $cc = uri_escape_utf8(join(',', @cc));
         my $href = "mailto:$to?In-Reply-To=$irt&Cc=${cc}&Subject=$subj";
         $href =~ s/%20/+/g;