diff options
-rw-r--r-- | lib/PublicInbox/Hval.pm | 2 | ||||
-rw-r--r-- | t/hval.t | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm index 80050886..8d36fc2b 100644 --- a/lib/PublicInbox/Hval.pm +++ b/lib/PublicInbox/Hval.pm @@ -100,7 +100,7 @@ sub obfuscate_addrs ($$) { if ($addrs->{$addr} || ((defined $re && $domain =~ $re))) { $addr; } else { - $addr =~ s!([^\.]+)\.!$1•!g; + $addr =~ s!([^\.]+)\.!$1•!; $addr } /sge; @@ -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'); |