X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/bf9aa082309cd2e6e47e90f7da06034ab5e2a922ecfdad1c29d2e52c75467185..9d876d942b259c1b18b84af1af3b267b76369f6fcdb6fc188d9e14a5436bf6f9:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 09f1135..b1c9cdf 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -1385,13 +1385,11 @@ sub format_log_line_html { my $line = shift; $line = esc_html($line, -nbsp=>1); - if ($line =~ m/\b([0-9a-fA-F]{8,40})\b/) { - my $hash_text = $1; - my $link = - $cgi->a({-href => href(action=>"object", hash=>$hash_text), - -class => "text"}, $hash_text); - $line =~ s/$hash_text/$link/; - } + $line =~ s{\b([0-9a-fA-F]{8,40})\b}{ + $cgi->a({-href => href(action=>"object", hash=>$1), + -class => "text"}, $1); + }eg; + return $line; }