We shouldn't rerun the address obfuscator on data we've
already run through. Instead, run through the unescaped
text part and substitute the UTF-8 "\x{2022}" substitution
before it hits HTML escaping
Fixes: 9bdd81dc16ba6511 ("view: msg_iter calls add_body_text directly")
# However, • was chosen to make copy+paste errors more obvious
sub obfuscate_addrs ($$;$) {
my $ibx = $_[0];
- my $repl = $_[2] || '•';
+ my $repl = $_[2] // '•';
my $re = $ibx->{-no_obfuscate_re}; # regex of domains
my $addrs = $ibx->{-no_obfuscate}; # { adddress => 1 }
$_[1] =~ s/(([\w\.\+=\-]+)\@([\w\-]+\.[\w\.\-]+))/
# link generation in diffs with the extra '%0D'
$s =~ s/\r\n/\n/sg;
+ # will be escaped to `•' in HTML
+ obfuscate_addrs($ibx, $s, "\x{2022}") if $ibx->{obfuscate};
+
# always support diff-highlighting, but we can't linkify hunk
# headers for solver unless some coderepo are configured:
my $diff;
}
undef $cur; # free memory
}
-
- obfuscate_addrs($ibx, $$rv) if $ibx->{obfuscate};
}
sub _msg_page_prepare_obuf {