This makes is possible to use cgit with repository urls containing special url characters like '#' and '?'.
Unified · Split
| @@ -131,9 +131,7 @@ void cgit_print_repolist() · 130 unmodified lines | ||
| 131 | 131 | } |
| 132 | 132 | htmlf("<tr><td class='%s'>", |
| 133 | 133 | ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); |
| 134 | − html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); | |
| 135 | − html_txt(ctx.repo->name); | |
| 136 | − html_link_close(); | |
| 134 | + cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); | |
| 137 | 135 | html("</td><td>"); |
| 138 | 136 | html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); |
| 139 | 137 | html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); |
| @@ -145,9 +143,7 @@ void cgit_print_repolist() · 5 unmodified lines | ||
| 145 | 143 | html("</td>"); |
| 146 | 144 | if (ctx.cfg.enable_index_links) { |
| 147 | 145 | html("<td>"); |
| 148 | − html_link_open(cgit_repourl(ctx.repo->url), | |
| 149 | − NULL, "button"); | |
| 150 | − html("summary</a>"); | |
| 146 | + cgit_summary_link("summary", NULL, "button", NULL); | |
| 151 | 147 | cgit_log_link("log", NULL, "button", NULL, NULL, NULL, |
| 152 | 148 | 0, NULL, NULL); |
| 153 | 149 | cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); |
| @@ -603,8 +603,7 @@ void cgit_print_pageheader(struct cgit_context *ctx) · 602 unmodified lines | ||
| 603 | 603 | if (ctx->repo) { |
| 604 | 604 | cgit_index_link("index", NULL, NULL, NULL, 0); |
| 605 | 605 | html(" : "); |
| 606 | − reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"), | |
| 607 | − ctx->qry.head, NULL, NULL); | |
| 606 | + cgit_summary_link(ctx->repo->name, ctx->repo->name, NULL, NULL); | |
| 608 | 607 | html("</td><td class='form'>"); |
| 609 | 608 | html("<form method='get' action=''>\n"); |
| 610 | 609 | add_hidden_formfields(0, 1, ctx->qry.page); |
| @@ -632,8 +631,8 @@ void cgit_print_pageheader(struct cgit_context *ctx) · 21 unmodified lines | ||
| 632 | 631 | |
| 633 | 632 | html("<table class='tabs'><tr><td>\n"); |
| 634 | 633 | if (ctx->repo) { |
| 635 | − reporevlink(NULL, "summary", NULL, hc(cmd, "summary"), | |
| 636 | − ctx->qry.head, NULL, NULL); | |
| 634 | + cgit_summary_link(ctx->repo->name, ctx->repo->name, NULL, | |
| 635 | + ctx->qry.head); | |
| 637 | 636 | cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head, |
| 638 | 637 | ctx->qry.sha1, NULL); |
| 639 | 638 | cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head, |