about summary refs log tree commit homepage
path: root/lib/PublicInbox/Hval.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Hval.pm')
-rw-r--r--lib/PublicInbox/Hval.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm
index 0e199025..d65ab321 100644
--- a/lib/PublicInbox/Hval.pm
+++ b/lib/PublicInbox/Hval.pm
@@ -91,8 +91,9 @@ sub prurl {
 # ․ · and ͺ were also candidates:
 #   https://public-inbox.org/meta/20170615015250.GA6484@starla/
 # However, • was chosen to make copy+paste errors more obvious
-sub obfuscate_addrs ($$) {
+sub obfuscate_addrs ($$;$) {
         my $ibx = $_[0];
+        my $repl = $_[2] || '•';
         my $re = $ibx->{-no_obfuscate_re}; # regex of domains
         my $addrs = $ibx->{-no_obfuscate}; # { adddress => 1 }
         $_[1] =~ s/(([\w\.\+=\-]+)\@([\w\-]+\.[\w\.\-]+))/
@@ -100,7 +101,7 @@ sub obfuscate_addrs ($$) {
                 if ($addrs->{$addr} || ((defined $re && $domain =~ $re))) {
                         $addr;
                 } else {
-                        $domain =~ s!([^\.]+)\.!$1•!;
+                        $domain =~ s!([^\.]+)\.!$1$repl!;
                         $user . '@' . $domain
                 }
                 /sge;