]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Better regexp for SHA-1 committag match
[Gitweb] / gitweb.perl
index a0b1681acaf23200cf0835ca08c29be0c7eab7cc66e01671a56281e726cba017..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),
@@ -2902,14 +2902,14 @@ sub git_header_html {
 <meta name="robots" content="index, nofollow"/>
 <title>$title</title>
 EOF
-# the stylesheet, favicon etc urls won't work correctly with path_info unless we
-# set the appropriate base URL
+       # the stylesheet, favicon etc urls won't work correctly with path_info
+       # unless we set the appropriate base URL
        if ($ENV{'PATH_INFO'}) {
                print '<base href="'.esc_url($my_url).'" />\n';
        }
-# print out each stylesheet that exist
+       # print out each stylesheet that exist, providing backwards capability
+       # for those people who defined $stylesheet in a config file
        if (defined $stylesheet) {
-#provides backwards capability for those people who define style sheet in a config file
                print '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'"/>'."\n";
        } else {
                foreach my $stylesheet (@stylesheets) {
This page took 0.223513 seconds and 4 git commands to generate.