lib/PublicInbox/Hval.pm | 2 +- t/hval.t | 2 ++ diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm index 800508861bcdb28dc435d121d7d1074d6814f2fd..8d36fc2ba6a38189193360e0059647688346eabf 100644 --- a/lib/PublicInbox/Hval.pm +++ b/lib/PublicInbox/Hval.pm @@ -100,7 +100,7 @@ my ($addr, $domain) = ($1, $2); if ($addrs->{$addr} || ((defined $re && $domain =~ $re))) { $addr; } else { - $addr =~ s!([^\.]+)\.!$1•!g; + $addr =~ s!([^\.]+)\.!$1•!; $addr } /sge; diff --git a/t/hval.t b/t/hval.t index dcbd838240c42639a3a5984771508067b9aa8fe8..a3712666d617511a5fc8fcc2b376244fc38b1014 100644 --- a/t/hval.t +++ b/t/hval.t @@ -17,6 +17,7 @@ hello@example.comm hello@example.com meta@public-inbox.org test@public-inbox.org +test@a.b.c.org EOF PublicInbox::Hval::obfuscate_addrs($ibx, $html); @@ -26,6 +27,7 @@ hello@example•comm hello@example.com meta@public-inbox.org test@public-inbox•org +test@a•b.c.org EOF is($html, $exp, 'only obfuscated relevant addresses');