use PublicInbox::Hval qw(ascii_html obfuscate_addrs mid_href);
use PublicInbox::Address;
use PublicInbox::MID qw(mid_clean);
+use PublicInbox::Config;
-sub squote_maybe ($) {
- my ($val) = @_;
- if ($val =~ m{([^\w@\./,\%\+\-])}) {
- $val =~ s/(['!])/'\\$1'/g; # '!' for csh
- return "'$val'";
- }
- $val;
-}
+*squote_maybe = \&PublicInbox::Config::squote_maybe;
sub add_addrs {
my ($to, $cc, @addrs) = @_;
sub mailto_arg_link {
my ($ibx, $hdr) = @_;
my $cc = {}; # everyone else
- my $to; # this is the From address by defaultq
+ my $to; # this is the From address by default
my $reply_to_all = 'reply-to-all'; # the only good default :P
my $reply_to_cfg = $ibx->{replyto};
my $mid = $hdr->header_raw('Message-ID');
push @arg, '--in-reply-to='.squote_maybe(mid_clean($mid));
my $irt = mid_href($mid);
+ add_addrs(\$to, $cc, $ibx->{-primary_address}) unless defined($to);
delete $cc->{$to};
if ($obfs) {
my $arg_to = $to;