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