Only one substitution character is necessary when obfuscating
email addresses.
if ($addrs->{$addr} || ((defined $re && $domain =~ $re))) {
$addr;
} else {
- $addr =~ s!([^\.]+)\.!$1•!g;
+ $addr =~ s!([^\.]+)\.!$1•!;
$addr
}
/sge;
hello@example.com
meta@public-inbox.org
test@public-inbox.org
+test@a.b.c.org
EOF
PublicInbox::Hval::obfuscate_addrs($ibx, $html);
hello@example.com
meta@public-inbox.org
test@public-inbox•org
+test@a•b.c.org
EOF
is($html, $exp, 'only obfuscated relevant addresses');