]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Better regexp for SHA-1 committag match
[Gitweb] / gitweb.perl
index 10f679d2e1bdcab2d405a0a2bf5715b337ed85c8f3d5aabb026bf97bf929c9b1..913edb168767bc7e618396a91f94e31afd03455defc5ea145d6c2a8fe7f4475e 100755 (executable)
@@ -1365,7 +1365,7 @@ sub format_log_line_html {
        my $line = shift;
 
        $line = esc_html($line, -nbsp=>1);
-       if ($line =~ m/([0-9a-fA-F]{8,40})/) {
+       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),
This page took 0.215712 seconds and 4 git commands to generate.