diff options
-rwxr-xr-x | gitweb/gitweb.cgi | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index 518d64d..a21c174 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -195,6 +195,13 @@ sub gitweb_get_default_head { return "HEAD"; } +sub nospam { + my $committer = shift; + $committer =~ s/\./ dot /g; + $committer =~ s/\@/ at /g; + return $committer; +} + sub gitweb_check_feature { my ($name) = @_; return unless exists $feature{$name}; @@ -2862,7 +2869,7 @@ sub git_tag { "</tr>\n"; if (defined($tag{'author'})) { my %ad = parse_date($tag{'epoch'}, $tag{'tz'}); - print "<tr><td>author</td><td>" . esc_html($tag{'author'}) . "</td></tr>\n"; + print "<tr><td>author</td><td>" . esc_html(nospam($tag{'author'})) . "</td></tr>\n"; print "<tr><td></td><td>" . $ad{'rfc2822'} . sprintf(" (%02d:%02d %s)", $ad{'hour_local'}, $ad{'minute_local'}, $ad{'tz_local'}) . "</td></tr>\n"; @@ -3458,7 +3465,7 @@ sub git_commit { } print "<div class=\"title_text\">\n" . "<table cellspacing=\"0\">\n"; - print "<tr><td>author</td><td>" . esc_html($co{'author'}) . "</td></tr>\n". + print "<tr><td>author</td><td>" . esc_html(nospam($co{'author'})) . "</td></tr>\n". "<tr>" . "<td></td><td> $ad{'rfc2822'}"; if ($ad{'hour_local'} < 6) { @@ -3470,7 +3477,7 @@ sub git_commit { } print "</td>" . "</tr>\n"; - print "<tr><td>committer</td><td>" . esc_html($co{'committer'}) . "</td></tr>\n"; + print "<tr><td>committer</td><td>" . esc_html(nospam($co{'committer'})) . "</td></tr>\n"; print "<tr><td></td><td> $cd{'rfc2822'}" . sprintf(" (%02d:%02d %s)", $cd{'hour_local'}, $cd{'minute_local'}, $cd{'tz_local'}) . "</td></tr>\n"; |