escape '+' and ' ' in url's
Kay Sievers committed
Nov 14, 2005 at 05:47 UTC
353347b0b811fcdb7c7064a85d1729433c0b8d51
1 file changed
+199
-191
gitweb.cgi
+199
-191
@@ -78,7 +78,8 @@ if (defined $project) {
78
undef $project;
79
die_error(undef, "No such project.");
80
}
81
- $rss_link = "<link rel=\"alternate\" title=\"$project log\" href=\"$my_uri?p=$project;a=rss\" type=\"application/rss+xml\"/>";
81
+ $rss_link = "<link rel=\"alternate\" title=\"" . esc($project) . " log\" href=\"" .
82
+ esc("$my_uri?p=$project;a=rss") . "\" type=\"application/rss+xml\"/>";
83
$ENV{'GIT_DIR'} = "$projectroot/$project";
84
} else {
85
git_project_list();
@@ -206,6 +207,13 @@ if (!defined $action || $action eq "summary") {
207
exit;
208
}
209
210
+sub esc {
211
+ my $str = shift;
212
+ $str =~ s/ /\+/g;
213
+ $str =~ s/\+/%2b/g;
214
+ return $str;
215
+}
216
+
217
sub git_header_html {
218
my $status = shift || "200 OK";
219
my $expires = shift;
@@ -286,11 +294,11 @@ a.rss_logo:hover { background-color:#ee5500; }
294
EOF
295
print "<div class=\"page_header\">\n" .
296
"<a href=\"http://www.kernel.org/pub/software/scm/git/docs/\" title=\"git documentation\">" .
289
- "<img src=\"$my_uri?a=git-logo.png\" width=\"72\" height=\"27\" alt=\"git\" style=\"float:right; border-width:0px;\"/>" .
297
+ "<img src=\"" . esc("$my_uri?a=git-logo.png") . "\" width=\"72\" height=\"27\" alt=\"git\" style=\"float:right; border-width:0px;\"/>" .
298
"</a>\n";
291
- print $cgi->a({-href => $home_link}, "projects") . " / ";
299
+ print $cgi->a({-href => esc($home_link)}, "projects") . " / ";
300
if (defined $project) {
293
- print $cgi->a({-href => "$my_uri?p=$project;a=summary"}, escapeHTML($project));
301
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, escapeHTML($project));
302
if (defined $action) {
303
print " / $action";
304
}
@@ -306,7 +314,7 @@ EOF
314
}
315
$cgi->param("a", "search");
316
$cgi->param("h", $search_hash);
309
- print $cgi->startform(-method => "get", -action => "$my_uri") .
317
+ print $cgi->startform(-method => "get", -action => $my_uri) .
318
"<div class=\"search\">\n" .
319
$cgi->hidden(-name => "p") . "\n" .
320
$cgi->hidden(-name => "a") . "\n" .
@@ -325,9 +333,9 @@ sub git_footer_html {
333
if (defined $descr) {
334
print "<div class=\"page_footer_text\">" . escapeHTML($descr) . "</div>\n";
335
}
328
- print $cgi->a({-href => "$my_uri?p=$project;a=rss", -class => "rss_logo"}, "RSS") . "\n";
336
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=rss"), -class => "rss_logo"}, "RSS") . "\n";
337
} else {
330
- print $cgi->a({-href => "$my_uri?a=opml", -class => "rss_logo"}, "OPML") . "\n";
338
+ print $cgi->a({-href => esc("$my_uri?a=opml"), -class => "rss_logo"}, "OPML") . "\n";
339
}
340
print "</div>\n" .
341
"</body>\n" .
@@ -668,7 +676,7 @@ sub format_log_line_html {
676
if ($line =~ m/([0-9a-fA-F]{40})/) {
677
my $hash_text = $1;
678
if (git_get_type($hash_text) eq "commit") {
671
- my $link = $cgi->a({-class => "text", -href => "$my_uri?p=$project;a=commit;h=$hash_text"}, $hash_text);
679
+ my $link = $cgi->a({-class => "text", -href => esc("$my_uri?p=$project;a=commit;h=$hash_text")}, $hash_text);
680
$line =~ s/$hash_text/$link/;
681
}
682
}
@@ -816,25 +824,25 @@ sub git_project_list {
824
@projects = sort {$a->{'path'} cmp $b->{'path'}} @projects;
825
print "<th>Project</th>\n";
826
} else {
819
- print "<th>" . $cgi->a({-class => "header", -href => "$my_uri?o=project"}, "Project") . "</th>\n";
827
+ print "<th>" . $cgi->a({-class => "header", -href => esc("$my_uri?o=project")}, "Project") . "</th>\n";
828
}
829
if (defined($order) && ($order eq "descr")) {
830
@projects = sort {$a->{'descr'} cmp $b->{'descr'}} @projects;
831
print "<th>Description</th>\n";
832
} else {
825
- print "<th>" . $cgi->a({-class => "header", -href => "$my_uri?o=descr"}, "Description") . "</th>\n";
833
+ print "<th>" . $cgi->a({-class => "header", -href => esc("$my_uri?o=descr")}, "Description") . "</th>\n";
834
}
835
if (defined($order) && ($order eq "owner")) {
836
@projects = sort {$a->{'owner'} cmp $b->{'owner'}} @projects;
837
print "<th>Owner</th>\n";
838
} else {
831
- print "<th>" . $cgi->a({-class => "header", -href => "$my_uri?o=owner"}, "Owner") . "</th>\n";
839
+ print "<th>" . $cgi->a({-class => "header", -href => esc("$my_uri?o=owner")}, "Owner") . "</th>\n";
840
}
841
if (defined($order) && ($order eq "age")) {
842
@projects = sort {$a->{'commit'}{'age'} <=> $b->{'commit'}{'age'}} @projects;
843
print "<th>Last Change</th>\n";
844
} else {
837
- print "<th>" . $cgi->a({-class => "header", -href => "$my_uri?o=age"}, "Last Change") . "</th>\n";
845
+ print "<th>" . $cgi->a({-class => "header", -href => esc("$my_uri?o=age")}, "Last Change") . "</th>\n";
846
}
847
print "<th></th>\n" .
848
"</tr>\n";
@@ -846,7 +854,7 @@ sub git_project_list {
854
print "<tr class=\"light\">\n";
855
}
856
$alternate ^= 1;
849
- print "<td>" . $cgi->a({-href => "$my_uri?p=$pr->{'path'};a=summary", -class => "list"}, escapeHTML($pr->{'path'})) . "</td>\n" .
857
+ print "<td>" . $cgi->a({-href => esc("$my_uri?p=$pr->{'path'};a=summary"), -class => "list"}, escapeHTML($pr->{'path'})) . "</td>\n" .
858
"<td>$pr->{'descr'}</td>\n" .
859
"<td><i>" . chop_str($pr->{'owner'}, 15) . "</i></td>\n";
860
my $colored_age;
@@ -859,9 +867,9 @@ sub git_project_list {
867
}
868
print "<td>$colored_age</td>\n" .
869
"<td class=\"link\">" .
862
- $cgi->a({-href => "$my_uri?p=$pr->{'path'};a=summary"}, "summary") .
863
- " | " . $cgi->a({-href => "$my_uri?p=$pr->{'path'};a=shortlog"}, "shortlog") .
864
- " | " . $cgi->a({-href => "$my_uri?p=$pr->{'path'};a=log"}, "log") .
870
+ $cgi->a({-href => esc("$my_uri?p=$pr->{'path'};a=summary")}, "summary") .
871
+ " | " . $cgi->a({-href => esc("$my_uri?p=$pr->{'path'};a=shortlog")}, "shortlog") .
872
+ " | " . $cgi->a({-href => esc("$my_uri?p=$pr->{'path'};a=log")}, "log") .
873
"</td>\n" .
874
"</tr>\n";
875
}
@@ -960,11 +968,11 @@ sub git_summary {
968
git_header_html();
969
print "<div class=\"page_nav\">\n" .
970
"summary".
963
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
964
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
965
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") .
966
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") .
967
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree"}, "tree") .
971
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
972
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "log") .
973
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$head")}, "commit") .
974
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$head")}, "commitdiff") .
975
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree")}, "tree") .
976
"<br/><br/>\n" .
977
"</div>\n";
978
print "<div class=\"title\"> </div>\n";
@@ -977,7 +985,7 @@ sub git_summary {
985
my (@revlist) = map { chomp; $_ } <$fd>;
986
close $fd;
987
print "<div>\n" .
980
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog", -class => "title"}, "shortlog") .
988
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog"), -class => "title"}, "shortlog") .
989
"</div>\n";
990
my $i = 16;
991
print "<table cellspacing=\"0\">\n";
@@ -996,20 +1004,20 @@ sub git_summary {
1004
"<td><i>" . escapeHTML(chop_str($co{'author_name'}, 10)) . "</i></td>\n" .
1005
"<td>";
1006
if (length($co{'title_short'}) < length($co{'title'})) {
999
- print $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list", -title => "$co{'title'}"},
1007
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit"), -class => "list", -title => "$co{'title'}"},
1008
"<b>" . escapeHTML($co{'title_short'}) . "</b>");
1009
} else {
1002
- print $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list"},
1010
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit"), -class => "list"},
1011
"<b>" . escapeHTML($co{'title'}) . "</b>");
1012
}
1013
print "</td>\n" .
1014
"<td class=\"link\">" .
1007
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") .
1008
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") .
1015
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit")}, "commit") .
1016
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$commit")}, "commitdiff") .
1017
"</td>\n" .
1018
"</tr>";
1019
} else {
1012
- print "<td>" . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "...") . "</td>\n" .
1020
+ print "<td>" . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "...") . "</td>\n" .
1021
"</tr>";
1022
last;
1023
}
@@ -1019,7 +1027,7 @@ sub git_summary {
1027
my $taglist = git_read_refs("refs/tags");
1028
if (defined @$taglist) {
1029
print "<div>\n" .
1022
- $cgi->a({-href => "$my_uri?p=$project;a=tags", -class => "title"}, "tags") .
1030
+ $cgi->a({-href => esc("$my_uri?p=$project;a=tags"), -class => "title"}, "tags") .
1031
"</div>\n";
1032
my $i = 16;
1033
print "<table cellspacing=\"0\">\n";
@@ -1040,27 +1048,27 @@ sub git_summary {
1048
if ($i-- > 0) {
1049
print "<td><i>$tag{'age'}</i></td>\n" .
1050
"<td>" .
1043
- $cgi->a({-href => "$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}", -class => "list"},
1051
+ $cgi->a({-href => esc("$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}"), -class => "list"},
1052
"<b>" . escapeHTML($tag{'name'}) . "</b>") .
1053
"</td>\n" .
1054
"<td>";
1055
if (defined($comment)) {
1048
- print $cgi->a({-class => "list", -href => "$my_uri?p=$project;a=tag;h=$tag{'id'}"}, $comment);
1056
+ print $cgi->a({-class => "list", -href => esc("$my_uri?p=$project;a=tag;h=$tag{'id'}")}, $comment);
1057
}
1058
print "</td>\n" .
1059
"<td class=\"link\">";
1060
if ($tag{'type'} eq "tag") {
1053
- print $cgi->a({-href => "$my_uri?p=$project;a=tag;h=$tag{'id'}"}, "tag") . " | ";
1061
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=tag;h=$tag{'id'}")}, "tag") . " | ";
1062
}
1055
- print $cgi->a({-href => "$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}"}, $tag{'reftype'});
1063
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}")}, $tag{'reftype'});
1064
if ($tag{'reftype'} eq "commit") {
1057
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}"}, "shortlog") .
1058
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'refid'}"}, "log");
1065
+ print " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$tag{'name'}")}, "shortlog") .
1066
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$tag{'refid'}")}, "log");
1067
}
1068
print "</td>\n" .
1069
"</tr>";
1070
} else {
1063
- print "<td>" . $cgi->a({-href => "$my_uri?p=$project;a=tags"}, "...") . "</td>\n" .
1071
+ print "<td>" . $cgi->a({-href => esc("$my_uri?p=$project;a=tags")}, "...") . "</td>\n" .
1072
"</tr>";
1073
last;
1074
}
@@ -1071,7 +1079,7 @@ sub git_summary {
1079
my $headlist = git_read_refs("refs/heads");
1080
if (defined @$headlist) {
1081
print "<div>\n" .
1074
- $cgi->a({-href => "$my_uri?p=$project;a=heads", -class => "title"}, "heads") .
1082
+ $cgi->a({-href => esc("$my_uri?p=$project;a=heads"), -class => "title"}, "heads") .
1083
"</div>\n";
1084
my $i = 16;
1085
print "<table cellspacing=\"0\">\n";
@@ -1087,16 +1095,16 @@ sub git_summary {
1095
if ($i-- > 0) {
1096
print "<td><i>$tag{'age'}</i></td>\n" .
1097
"<td>" .
1090
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}", -class => "list"},
1098
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$tag{'name'}"), -class => "list"},
1099
"<b>" . escapeHTML($tag{'name'}) . "</b>") .
1100
"</td>\n" .
1101
"<td class=\"link\">" .
1094
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}"}, "shortlog") .
1095
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'name'}"}, "log") .
1102
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$tag{'name'}")}, "shortlog") .
1103
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$tag{'name'}")}, "log") .
1104
"</td>\n" .
1105
"</tr>";
1106
} else {
1099
- print "<td>" . $cgi->a({-href => "$my_uri?p=$project;a=heads"}, "...") . "</td>\n" .
1107
+ print "<td>" . $cgi->a({-href => esc("$my_uri?p=$project;a=heads")}, "...") . "</td>\n" .
1108
"</tr>";
1109
last;
1110
}
@@ -1110,24 +1118,24 @@ sub git_tag {
1118
my $head = git_read_hash("$project/HEAD");
1119
git_header_html();
1120
print "<div class=\"page_nav\">\n" .
1113
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1114
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
1115
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
1116
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") .
1117
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") .
1118
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;hb=$head"}, "tree") . "<br/>\n" .
1121
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1122
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
1123
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "log") .
1124
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$head")}, "commit") .
1125
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$head")}, "commitdiff") .
1126
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;hb=$head")}, "tree") . "<br/>\n" .
1127
"<br/>\n" .
1128
"</div>\n";
1129
my %tag = git_read_tag($hash);
1130
print "<div>\n" .
1123
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($tag{'name'})) . "\n" .
1131
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash"), -class => "title"}, escapeHTML($tag{'name'})) . "\n" .
1132
"</div>\n";
1133
print "<div class=\"title_text\">\n" .
1134
"<table cellspacing=\"0\">\n" .
1135
"<tr>\n" .
1136
"<td>object</td>\n" .
1129
- "<td>" . $cgi->a({-class => "list", -href => "$my_uri?p=$project;a=$tag{'type'};h=$tag{'object'}"}, $tag{'object'}) . "</td>\n" .
1130
- "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$project;a=$tag{'type'};h=$tag{'object'}"}, $tag{'type'}) . "</td>\n" .
1137
+ "<td>" . $cgi->a({-class => "list", -href => esc("$my_uri?p=$project;a=$tag{'type'};h=$tag{'object'}")}, $tag{'object'}) . "</td>\n" .
1138
+ "<td class=\"link\">" . $cgi->a({-href => esc("$my_uri?p=$project;a=$tag{'type'};h=$tag{'object'}")}, $tag{'type'}) . "</td>\n" .
1139
"</tr>\n";
1140
if (defined($tag{'author'})) {
1141
my %ad = date_str($tag{'epoch'}, $tag{'tz'});
@@ -1149,17 +1157,17 @@ sub git_tags {
1157
my $head = git_read_hash("$project/HEAD");
1158
git_header_html();
1159
print "<div class=\"page_nav\">\n" .
1152
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1153
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
1154
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
1155
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") .
1156
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") .
1157
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;hb=$head"}, "tree") . "<br/>\n" .
1160
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1161
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
1162
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "log") .
1163
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$head")}, "commit") .
1164
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$head")}, "commitdiff") .
1165
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;hb=$head")}, "tree") . "<br/>\n" .
1166
"<br/>\n" .
1167
"</div>\n";
1168
my $taglist = git_read_refs("refs/tags");
1169
print "<div>\n" .
1162
- $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") .
1170
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary"), -class => "title"}, " ") .
1171
"</div>\n";
1172
print "<table cellspacing=\"0\">\n";
1173
my $alternate = 0;
@@ -1179,22 +1187,22 @@ sub git_tags {
1187
$alternate ^= 1;
1188
print "<td><i>$tag{'age'}</i></td>\n" .
1189
"<td>" .
1182
- $cgi->a({-href => "$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}", -class => "list"},
1190
+ $cgi->a({-href => esc("$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}"), -class => "list"},
1191
"<b>" . escapeHTML($tag{'name'}) . "</b>") .
1192
"</td>\n" .
1193
"<td>";
1194
if (defined($comment)) {
1187
- print $cgi->a({-class => "list", -href => "$my_uri?p=$project;a=tag;h=$tag{'id'}"}, $comment);
1195
+ print $cgi->a({-class => "list", -href => esc("$my_uri?p=$project;a=tag;h=$tag{'id'}")}, $comment);
1196
}
1197
print "</td>\n" .
1198
"<td class=\"link\">";
1199
if ($tag{'type'} eq "tag") {
1192
- print $cgi->a({-href => "$my_uri?p=$project;a=tag;h=$tag{'id'}"}, "tag") . " | ";
1200
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=tag;h=$tag{'id'}")}, "tag") . " | ";
1201
}
1194
- print $cgi->a({-href => "$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}"}, $tag{'reftype'});
1202
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}")}, $tag{'reftype'});
1203
if ($tag{'reftype'} eq "commit") {
1196
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}"}, "shortlog") .
1197
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'refid'}"}, "log");
1204
+ print " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$tag{'name'}")}, "shortlog") .
1205
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$tag{'refid'}")}, "log");
1206
}
1207
print "</td>\n" .
1208
"</tr>";
@@ -1208,17 +1216,17 @@ sub git_heads {
1216
my $head = git_read_hash("$project/HEAD");
1217
git_header_html();
1218
print "<div class=\"page_nav\">\n" .
1211
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1212
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
1213
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
1214
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") .
1215
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") .
1216
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;hb=$head"}, "tree") . "<br/>\n" .
1219
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1220
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
1221
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "log") .
1222
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$head")}, "commit") .
1223
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$head")}, "commitdiff") .
1224
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;hb=$head")}, "tree") . "<br/>\n" .
1225
"<br/>\n" .
1226
"</div>\n";
1227
my $taglist = git_read_refs("refs/heads");
1228
print "<div>\n" .
1221
- $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") .
1229
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary"), -class => "title"}, " ") .
1230
"</div>\n";
1231
print "<table cellspacing=\"0\">\n";
1232
my $alternate = 0;
@@ -1233,11 +1241,11 @@ sub git_heads {
1241
$alternate ^= 1;
1242
print "<td><i>$tag{'age'}</i></td>\n" .
1243
"<td>" .
1236
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}", -class => "list"}, "<b>" . escapeHTML($tag{'name'}) . "</b>") .
1244
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$tag{'name'}"), -class => "list"}, "<b>" . escapeHTML($tag{'name'}) . "</b>") .
1245
"</td>\n" .
1246
"<td class=\"link\">" .
1239
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}"}, "shortlog") .
1240
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'name'}"}, "log") .
1247
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$tag{'name'}")}, "shortlog") .
1248
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$tag{'name'}")}, "log") .
1249
"</td>\n" .
1250
"</tr>";
1251
}
@@ -1285,20 +1293,20 @@ sub git_blob {
1293
git_header_html();
1294
if (defined $hash_base && (my %co = git_read_commit($hash_base))) {
1295
print "<div class=\"page_nav\">\n" .
1288
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1289
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
1290
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
1291
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base"}, "commit") .
1292
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash_base"}, "commitdiff") .
1293
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash_base"}, "tree") . "<br/>\n";
1296
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1297
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
1298
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "log") .
1299
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash_base")}, "commit") .
1300
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash_base")}, "commitdiff") .
1301
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash_base")}, "tree") . "<br/>\n";
1302
if (defined $file_name) {
1295
- print $cgi->a({-href => "$my_uri?p=$project;a=blob_plain;h=$hash;f=$file_name"}, "plain") . "<br/>\n";
1303
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=blob_plain;h=$hash;f=$file_name")}, "plain") . "<br/>\n";
1304
} else {
1297
- print $cgi->a({-href => "$my_uri?p=$project;a=blob_plain;h=$hash"}, "plain") . "<br/>\n";
1305
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=blob_plain;h=$hash")}, "plain") . "<br/>\n";
1306
}
1307
print "</div>\n".
1308
"<div>" .
1301
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base", -class => "title"}, escapeHTML($co{'title'})) .
1309
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash_base"), -class => "title"}, escapeHTML($co{'title'})) .
1310
"</div>\n";
1311
} else {
1312
print "<div class=\"page_nav\">\n" .
@@ -1361,16 +1369,16 @@ sub git_tree {
1369
if (defined $hash_base && (my %co = git_read_commit($hash_base))) {
1370
$base_key = ";hb=$hash_base";
1371
print "<div class=\"page_nav\">\n" .
1364
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1365
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash_base"}, "shortlog") .
1366
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash_base"}, "log") .
1367
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base"}, "commit") .
1368
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash_base"}, "commitdiff") .
1372
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1373
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$hash_base")}, "shortlog") .
1374
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$hash_base")}, "log") .
1375
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash_base")}, "commit") .
1376
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash_base")}, "commitdiff") .
1377
" | tree" .
1378
"<br/><br/>\n" .
1379
"</div>\n";
1380
print "<div>\n" .
1373
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1381
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash_base"), -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1382
"</div>\n";
1383
} else {
1384
print "<div class=\"page_nav\">\n";
@@ -1403,18 +1411,18 @@ sub git_tree {
1411
print "<td style=\"font-family:monospace\">" . mode_str($t_mode) . "</td>\n";
1412
if ($t_type eq "blob") {
1413
print "<td class=\"list\">" .
1406
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$t_hash" . $base_key . $file_key, -class => "list"}, $t_name) .
1414
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$t_hash" . $base_key . $file_key), -class => "list"}, $t_name) .
1415
"</td>\n" .
1416
"<td class=\"link\">" .
1409
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$t_hash" . $base_key . $file_key}, "blob") .
1410
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=history;h=$hash_base" . $file_key}, "history") .
1417
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$t_hash" . $base_key . $file_key)}, "blob") .
1418
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=history;h=$hash_base" . $file_key)}, "history") .
1419
"</td>\n";
1420
} elsif ($t_type eq "tree") {
1421
print "<td class=\"list\">" .
1414
- $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$t_hash" . $base_key . $file_key}, $t_name) .
1422
+ $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$t_hash" . $base_key . $file_key)}, $t_name) .
1423
"</td>\n" .
1424
"<td class=\"link\">" .
1417
- $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$t_hash" . $base_key . $file_key}, "tree") .
1425
+ $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$t_hash" . $base_key . $file_key)}, "tree") .
1426
"</td>\n";
1427
}
1428
print "</tr>\n";
@@ -1523,12 +1531,12 @@ sub git_log {
1531
}
1532
git_header_html();
1533
print "<div class=\"page_nav\">\n";
1526
- print $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1527
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") .
1534
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1535
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$hash")}, "shortlog") .
1536
" | log" .
1529
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
1530
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") .
1531
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$hash;hb=$hash"}, "tree") . "<br/>\n";
1537
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash")}, "commit") .
1538
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash")}, "commitdiff") .
1539
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$hash;hb=$hash")}, "tree") . "<br/>\n";
1540
1541
my $limit = sprintf("--max-count=%i", (100 * ($page+1)));
1542
open my $fd, "-|", "$gitbin/git-rev-list $limit $hash" or die_error(undef, "Open failed.");
@@ -1536,19 +1544,19 @@ sub git_log {
1544
close $fd;
1545
1546
if ($hash ne $head || $page) {
1539
- print $cgi->a({-href => "$my_uri?p=$project;a=log"}, "HEAD");
1547
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "HEAD");
1548
} else {
1549
print "HEAD";
1550
}
1551
if ($page > 0) {
1552
print " ⋅ " .
1545
- $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash;pg=" . ($page-1), -accesskey => "p", -title => "Alt-p"}, "prev");
1553
+ $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$hash;pg=" . ($page-1)), -accesskey => "p", -title => "Alt-p"}, "prev");
1554
} else {
1555
print " ⋅ prev";
1556
}
1557
if ($#revlist >= (100 * ($page+1)-1)) {
1558
print " ⋅ " .
1551
- $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash;pg=" . ($page+1), -accesskey => "n", -title => "Alt-n"}, "next");
1559
+ $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$hash;pg=" . ($page+1)), -accesskey => "n", -title => "Alt-n"}, "next");
1560
} else {
1561
print " ⋅ next";
1562
}
@@ -1556,7 +1564,7 @@ sub git_log {
1564
"</div>\n";
1565
if (!@revlist) {
1566
print "<div>\n" .
1559
- $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") .
1567
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary"), -class => "title"}, " ") .
1568
"</div>\n";
1569
my %co = git_read_commit($hash);
1570
print "<div class=\"page_body\"> Last change $co{'age_string'}.<br/><br/></div>\n";
@@ -1567,13 +1575,13 @@ sub git_log {
1575
next if !%co;
1576
my %ad = date_str($co{'author_epoch'});
1577
print "<div>\n" .
1570
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "title"},
1578
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit"), -class => "title"},
1579
"<span class=\"age\">$co{'age_string'}</span>" . escapeHTML($co{'title'})) . "\n" .
1580
"</div>\n";
1581
print "<div class=\"title_text\">\n" .
1582
"<div class=\"log_link\">\n" .
1575
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") .
1576
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") .
1583
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit")}, "commit") .
1584
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$commit")}, "commitdiff") .
1585
"<br/>\n" .
1586
"</div>\n" .
1587
"<i>" . escapeHTML($co{'author_name'}) . " [$ad{'rfc2822'}]</i><br/>\n" .
@@ -1629,22 +1637,22 @@ sub git_commit {
1637
}
1638
git_header_html(undef, $expires);
1639
print "<div class=\"page_nav\">\n" .
1632
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1633
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") .
1634
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
1640
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1641
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$hash")}, "shortlog") .
1642
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$hash")}, "log") .
1643
" | commit";
1644
if (defined $co{'parent'}) {
1637
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff");
1645
+ print " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash")}, "commitdiff");
1646
}
1639
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . "\n" .
1647
+ print " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") . "\n" .
1648
"<br/><br/></div>\n";
1649
if (defined $co{'parent'}) {
1650
print "<div>\n" .
1643
- $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1651
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash"), -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1652
"</div>\n";
1653
} else {
1654
print "<div>\n" .
1647
- $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1655
+ $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"), -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1656
"</div>\n";
1657
}
1658
print "<div class=\"title_text\">\n" .
@@ -1665,19 +1673,19 @@ sub git_commit {
1673
print "<tr>" .
1674
"<td>tree</td>" .
1675
"<td style=\"font-family:monospace\">" .
1668
- $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash", class => "list"}, $co{'tree'}) .
1676
+ $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"), class => "list"}, $co{'tree'}) .
1677
"</td>" .
1670
- "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") .
1678
+ "<td class=\"link\">" . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") .
1679
"</td>" .
1680
"</tr>\n";
1681
my $parents = $co{'parents'};
1682
foreach my $par (@$parents) {
1683
print "<tr>" .
1684
"<td>parent</td>" .
1677
- "<td style=\"font-family:monospace\">" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$par", class => "list"}, $par) . "</td>" .
1685
+ "<td style=\"font-family:monospace\">" . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$par"), class => "list"}, $par) . "</td>" .
1686
"<td class=\"link\">" .
1679
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$par"}, "commit") .
1680
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash;hp=$par"}, "commitdiff") .
1687
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$par")}, "commit") .
1688
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash;hp=$par")}, "commitdiff") .
1689
"</td>" .
1690
"</tr>\n";
1691
}
@@ -1738,16 +1746,16 @@ sub git_commit {
1746
$mode_chng = sprintf(" with mode: %04o", (oct $to_mode) & 0777);
1747
}
1748
print "<td>" .
1741
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file)) . "</td>\n" .
1749
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"), -class => "list"}, escapeHTML($file)) . "</td>\n" .
1750
"<td><span style=\"color: #008000;\">[new " . file_type($to_mode) . "$mode_chng]</span></td>\n" .
1743
- "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"}, "blob") . "</td>\n";
1751
+ "<td class=\"link\">" . $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file")}, "blob") . "</td>\n";
1752
} elsif ($status eq "D") {
1753
print "<td>" .
1746
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file)) . "</td>\n" .
1754
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file"), -class => "list"}, escapeHTML($file)) . "</td>\n" .
1755
"<td><span style=\"color: #c00000;\">[deleted " . file_type($from_mode). "]</span></td>\n" .
1756
"<td class=\"link\">" .
1749
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file"}, "blob") .
1750
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=history;h=$hash;f=$file"}, "history") .
1757
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file")}, "blob") .
1758
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=history;h=$hash;f=$file")}, "history") .
1759
"</td>\n"
1760
} elsif ($status eq "M" || $status eq "T") {
1761
my $mode_chnge = "";
@@ -1767,18 +1775,18 @@ sub git_commit {
1775
}
1776
print "<td>";
1777
if ($to_id ne $from_id) {
1770
- print $cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file));
1778
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$file"), -class => "list"}, escapeHTML($file));
1779
} else {
1772
- print $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file));
1780
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"), -class => "list"}, escapeHTML($file));
1781
}
1782
print "</td>\n" .
1783
"<td>$mode_chnge</td>\n" .
1784
"<td class=\"link\">";
1777
- print $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"}, "blob");
1785
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file")}, "blob");
1786
if ($to_id ne $from_id) {
1779
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$file"}, "diff");
1787
+ print " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$file")}, "diff");
1788
}
1781
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=history;h=$hash;f=$file"}, "history") . "\n";
1789
+ print " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=history;h=$hash;f=$file")}, "history") . "\n";
1790
print "</td>\n";
1791
} elsif ($status eq "R") {
1792
my ($from_file, $to_file) = split "\t", $file;
@@ -1787,14 +1795,14 @@ sub git_commit {
1795
$mode_chng = sprintf(", mode: %04o", (oct $to_mode) & 0777);
1796
}
1797
print "<td>" .
1790
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file", -class => "list"}, escapeHTML($to_file)) . "</td>\n" .
1798
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file"), -class => "list"}, escapeHTML($to_file)) . "</td>\n" .
1799
"<td><span style=\"color: #777777;\">[moved from " .
1792
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$from_file", -class => "list"}, escapeHTML($from_file)) .
1800
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$from_file"), -class => "list"}, escapeHTML($from_file)) .
1801
" with " . (int $similarity) . "% similarity$mode_chng]</span></td>\n" .
1802
"<td class=\"link\">" .
1795
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file"}, "blob");
1803
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file")}, "blob");
1804
if ($to_id ne $from_id) {
1797
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$to_file"}, "diff");
1805
+ print " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$to_file")}, "diff");
1806
}
1807
print "</td>\n";
1808
}
@@ -1809,17 +1817,17 @@ sub git_blobdiff {
1817
git_header_html();
1818
if (defined $hash_base && (my %co = git_read_commit($hash_base))) {
1819
print "<div class=\"page_nav\">\n" .
1812
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1813
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
1814
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
1815
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base"}, "commit") .
1816
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash_base"}, "commitdiff") .
1817
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash_base"}, "tree") .
1820
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1821
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
1822
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "log") .
1823
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash_base")}, "commit") .
1824
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash_base")}, "commitdiff") .
1825
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash_base")}, "tree") .
1826
"<br/>\n";
1819
- print $cgi->a({-href => "$my_uri?p=$project;a=blobdiff_plain;h=$hash;hp=$hash_parent"}, "plain") .
1827
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=blobdiff_plain;h=$hash;hp=$hash_parent")}, "plain") .
1828
"</div>\n";
1829
print "<div>\n" .
1822
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1830
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash_base"), -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1831
"</div>\n";
1832
} else {
1833
print "<div class=\"page_nav\">\n" .
@@ -1831,9 +1839,9 @@ sub git_blobdiff {
1839
}
1840
print "<div class=\"page_body\">\n" .
1841
"<div class=\"diff_info\">blob:" .
1834
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$hash_parent;hb=$hash_base;f=$file_name"}, $hash_parent) .
1842
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$hash_parent;hb=$hash_base;f=$file_name")}, $hash_parent) .
1843
" -> blob:" .
1836
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$hash;hb=$hash_base;f=$file_name"}, $hash) .
1844
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$hash;hb=$hash_base;f=$file_name")}, $hash) .
1845
"</div>\n";
1846
git_diff_print($hash_parent, $file_name || $hash_parent, $hash, $file_name || $hash);
1847
print "</div>";
@@ -1866,16 +1874,16 @@ sub git_commitdiff {
1874
}
1875
git_header_html(undef, $expires);
1876
print "<div class=\"page_nav\">\n" .
1869
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
1870
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") .
1871
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
1872
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
1877
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
1878
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$hash")}, "shortlog") .
1879
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$hash")}, "log") .
1880
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash")}, "commit") .
1881
" | commitdiff" .
1874
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . "<br/>\n";
1875
- print $cgi->a({-href => "$my_uri?p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent"}, "plain") . "\n" .
1882
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") . "<br/>\n";
1883
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent")}, "plain") . "\n" .
1884
"</div>\n";
1885
print "<div>\n" .
1878
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1886
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash"), -class => "title"}, escapeHTML($co{'title'})) . "\n" .
1887
"</div>\n";
1888
print "<div class=\"page_body\">\n";
1889
my $comment = $co{'comment'};
@@ -1914,20 +1922,20 @@ sub git_commitdiff {
1922
my $file = $6;
1923
if ($status eq "A") {
1924
print "<div class=\"diff_info\">" . file_type($to_mode) . ":" .
1917
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"}, $to_id) . "(new)" .
1925
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file")}, $to_id) . "(new)" .
1926
"</div>\n";
1927
git_diff_print(undef, "/dev/null", $to_id, "b/$file");
1928
} elsif ($status eq "D") {
1929
print "<div class=\"diff_info\">" . file_type($from_mode) . ":" .
1922
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file"}, $from_id) . "(deleted)" .
1930
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file")}, $from_id) . "(deleted)" .
1931
"</div>\n";
1932
git_diff_print($from_id, "a/$file", undef, "/dev/null");
1933
} elsif ($status eq "M") {
1934
if ($from_id ne $to_id) {
1935
print "<div class=\"diff_info\">" .
1928
- file_type($from_mode) . ":" . $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file"}, $from_id) .
1936
+ file_type($from_mode) . ":" . $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file")}, $from_id) .
1937
" -> " .
1930
- file_type($to_mode) . ":" . $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"}, $to_id);
1938
+ file_type($to_mode) . ":" . $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file")}, $to_id);
1939
print "</div>\n";
1940
git_diff_print($from_id, "a/$file", $to_id, "b/$file");
1941
}
@@ -2008,16 +2016,16 @@ sub git_history {
2016
}
2017
git_header_html();
2018
print "<div class=\"page_nav\">\n" .
2011
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
2012
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
2013
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
2014
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
2015
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") .
2016
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") .
2019
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
2020
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
2021
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log")}, "log") .
2022
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash")}, "commit") .
2023
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash")}, "commitdiff") .
2024
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") .
2025
"<br/><br/>\n" .
2026
"</div>\n";
2027
print "<div>\n" .
2020
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
2028
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash"), -class => "title"}, escapeHTML($co{'title'})) . "\n" .
2029
"</div>\n";
2030
print "<div class=\"page_path\"><b>/$file_name</b><br/></div>\n";
2031
@@ -2043,17 +2051,17 @@ sub git_history {
2051
$alternate ^= 1;
2052
print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
2053
"<td><i>" . escapeHTML(chop_str($co{'author_name'}, 15, 3)) . "</i></td>\n" .
2046
- "<td>" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list"}, "<b>" .
2054
+ "<td>" . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit"), -class => "list"}, "<b>" .
2055
escapeHTML(chop_str($co{'title'}, 50)) . "</b>") . "</td>\n" .
2056
"<td class=\"link\">" .
2049
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") .
2050
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") .
2051
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=blob;hb=$commit;f=$file_name"}, "blob");
2057
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit")}, "commit") .
2058
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$commit")}, "commitdiff") .
2059
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=blob;hb=$commit;f=$file_name")}, "blob");
2060
my $blob = git_get_hash_by_path($hash, $file_name);
2061
my $blob_parent = git_get_hash_by_path($commit, $file_name);
2062
if (defined $blob && defined $blob_parent && $blob ne $blob_parent) {
2063
print " | " .
2056
- $cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$blob;hp=$blob_parent;hb=$commit;f=$file_name"},
2064
+ $cgi->a({-href => esc("$my_uri?p=$project;a=blobdiff;h=$blob;hp=$blob_parent;hb=$commit;f=$file_name")},
2065
"diff to current");
2066
}
2067
print "</td>\n" .
@@ -2093,17 +2101,17 @@ sub git_search {
2101
}
2102
git_header_html();
2103
print "<div class=\"page_nav\">\n" .
2096
- $cgi->a({-href => "$my_uri?p=$project;a=summary;h=$hash"}, "summary") .
2097
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
2098
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
2099
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
2100
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") .
2101
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") .
2104
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary;h=$hash")}, "summary") .
2105
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "shortlog") .
2106
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$hash")}, "log") .
2107
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash")}, "commit") .
2108
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash")}, "commitdiff") .
2109
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") .
2110
"<br/><br/>\n" .
2111
"</div>\n";
2112
2113
print "<div>\n" .
2106
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
2114
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash"), -class => "title"}, escapeHTML($co{'title'})) . "\n" .
2115
"</div>\n";
2116
print "<table cellspacing=\"0\">\n";
2117
my $alternate = 0;
@@ -2134,7 +2142,7 @@ sub git_search {
2142
print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
2143
"<td><i>" . escapeHTML(chop_str($co{'author_name'}, 15, 5)) . "</i></td>\n" .
2144
"<td>" .
2137
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$co{'id'}", -class => "list"}, "<b>" . escapeHTML(chop_str($co{'title'}, 50)) . "</b><br/>");
2145
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$co{'id'}"), -class => "list"}, "<b>" . escapeHTML(chop_str($co{'title'}, 50)) . "</b><br/>");
2146
my $comment = $co{'comment'};
2147
foreach my $line (@$comment) {
2148
if ($line =~ m/^(.*)($searchtext)(.*)$/i) {
@@ -2149,8 +2157,8 @@ sub git_search {
2157
}
2158
print "</td>\n" .
2159
"<td class=\"link\">" .
2152
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$co{'id'}"}, "commit") .
2153
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$co{'id'}"}, "tree");
2160
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$co{'id'}")}, "commit") .
2161
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$co{'id'}")}, "tree");
2162
print "</td>\n" .
2163
"</tr>\n";
2164
}
@@ -2187,18 +2195,18 @@ sub git_search {
2195
print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
2196
"<td><i>" . escapeHTML(chop_str($co{'author_name'}, 15, 5)) . "</i></td>\n" .
2197
"<td>" .
2190
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$co{'id'}", -class => "list"}, "<b>" .
2198
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$co{'id'}"), -class => "list"}, "<b>" .
2199
escapeHTML(chop_str($co{'title'}, 50)) . "</b><br/>");
2200
while (my $setref = shift @files) {
2201
my %set = %$setref;
2194
- print $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$set{'id'};hb=$co{'id'};f=$set{'file'}", class => "list"},
2202
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=blob;h=$set{'id'};hb=$co{'id'};f=$set{'file'}"), class => "list"},
2203
"<span style=\"color:#e00000\">" . escapeHTML($set{'file'}) . "</span>") .
2204
"<br/>\n";
2205
}
2206
print "</td>\n" .
2207
"<td class=\"link\">" .
2200
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$co{'id'}"}, "commit") .
2201
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$co{'id'}"}, "tree");
2208
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$co{'id'}")}, "commit") .
2209
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$co{'id'}")}, "tree");
2210
print "</td>\n" .
2211
"</tr>\n";
2212
}
@@ -2221,12 +2229,12 @@ sub git_shortlog {
2229
}
2230
git_header_html();
2231
print "<div class=\"page_nav\">\n" .
2224
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
2232
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary")}, "summary") .
2233
" | shortlog" .
2226
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
2227
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
2228
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") .
2229
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$hash;hb=$hash"}, "tree") . "<br/>\n";
2234
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=log;h=$hash")}, "log") .
2235
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$hash")}, "commit") .
2236
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$hash")}, "commitdiff") .
2237
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=tree;h=$hash;hb=$hash")}, "tree") . "<br/>\n";
2238
2239
my $limit = sprintf("--max-count=%i", (100 * ($page+1)));
2240
open my $fd, "-|", "$gitbin/git-rev-list $limit $hash" or die_error(undef, "Open failed.");
@@ -2234,26 +2242,26 @@ sub git_shortlog {
2242
close $fd;
2243
2244
if ($hash ne $head || $page) {
2237
- print $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "HEAD");
2245
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog")}, "HEAD");
2246
} else {
2247
print "HEAD";
2248
}
2249
if ($page > 0) {
2250
print " ⋅ " .
2243
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page-1), -accesskey => "p", -title => "Alt-p"}, "prev");
2251
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page-1)), -accesskey => "p", -title => "Alt-p"}, "prev");
2252
} else {
2253
print " ⋅ prev";
2254
}
2255
if ($#revlist >= (100 * ($page+1)-1)) {
2256
print " ⋅ " .
2249
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page+1), -accesskey => "n", -title => "Alt-n"}, "next");
2257
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page+1)), -accesskey => "n", -title => "Alt-n"}, "next");
2258
} else {
2259
print " ⋅ next";
2260
}
2261
print "<br/>\n" .
2262
"</div>\n";
2263
print "<div>\n" .
2256
- $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") .
2264
+ $cgi->a({-href => esc("$my_uri?p=$project;a=summary"), -class => "title"}, " ") .
2265
"</div>\n";
2266
print "<table cellspacing=\"0\">\n";
2267
my $alternate = 0;
@@ -2271,23 +2279,23 @@ sub git_shortlog {
2279
"<td><i>" . escapeHTML(chop_str($co{'author_name'}, 10)) . "</i></td>\n" .
2280
"<td>";
2281
if (length($co{'title_short'}) < length($co{'title'})) {
2274
- print $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list", -title => "$co{'title'}"},
2282
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit"), -class => "list", -title => "$co{'title'}"},
2283
"<b>" . escapeHTML($co{'title_short'}) . "</b>");
2284
} else {
2277
- print $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list"},
2285
+ print $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit"), -class => "list"},
2286
"<b>" . escapeHTML($co{'title_short'}) . "</b>");
2287
}
2288
print "</td>\n" .
2289
"<td class=\"link\">" .
2282
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") .
2283
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") .
2290
+ $cgi->a({-href => esc("$my_uri?p=$project;a=commit;h=$commit")}, "commit") .
2291
+ " | " . $cgi->a({-href => esc("$my_uri?p=$project;a=commitdiff;h=$commit")}, "commitdiff") .
2292
"</td>\n" .
2293
"</tr>";
2294
}
2295
if ($#revlist >= (100 * ($page+1)-1)) {
2296
print "<tr>\n" .
2297
"<td>" .
2290
- $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page+1), -title => "Alt-n"}, "next") .
2298
+ $cgi->a({-href => esc("$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page+1)), -title => "Alt-n"}, "next") .
2299
"</td>\n" .
2300
"</tr>\n";
2301
}