]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Hval.pm
triewyde: ficks soem speling errrors
[public-inbox.git] / lib / PublicInbox / Hval.pm
index 5f7ab513b11d9d3f0cc61459153c6c067f8c0f7d..46a839160c3f996e25eb4e0b91b4a1a82fdfabef 100644 (file)
@@ -55,7 +55,6 @@ sub src_escape ($) {
 
 sub ascii_html {
        my ($s) = @_;
-       $s =~ s/\r\n/\n/sg; # fixup bad line endings
        $s =~ s/([<>&'"\x7f\x00-\x1f])/$xhtml_map{$1}/sge;
        $enc_ascii->encode($s, Encode::HTMLCREF);
 }
@@ -79,9 +78,9 @@ sub prurl ($$) {
 # However, &#8226; was chosen to make copy+paste errors more obvious
 sub obfuscate_addrs ($$;$) {
        my $ibx = $_[0];
-       my $repl = $_[2] || '&#8226;';
+       my $repl = $_[2] // '&#8226;';
        my $re = $ibx->{-no_obfuscate_re}; # regex of domains
-       my $addrs = $ibx->{-no_obfuscate}; # { adddress => 1 }
+       my $addrs = $ibx->{-no_obfuscate}; # { $address => 1 }
        $_[1] =~ s/(([\w\.\+=\-]+)\@([\w\-]+\.[\w\.\-]+))/
                my ($addr, $user, $domain) = ($1, $2, $3);
                if ($addrs->{$addr} || ((defined $re && $domain =~ $re))) {