cgit

commit 49ecbbddf0659c6409befcfe8989f92196133cda

Author: Lars Hjemli <hjemli@gmail.com>

ui-repolist + ui-shared: Use cgit_summary_link()

This makes is possible to use cgit with repository urls containing special
url characters like '#' and '?'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>

 ui-repolist.c | 8 ++------
 ui-shared.c | 7 +++----


diff --git a/ui-repolist.c b/ui-repolist.c
index 725338b33e63e9254f1db5bddc66393fdf1e1b0b..ab050c788af1ca58564f9dd70c7ebc984feadabb 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -131,9 +131,7 @@ 			last_group = ctx.repo->group;
 		}
 		htmlf("<tr><td class='%s'>",
 		      ctx.repo->group ? "sublevel-repo" : "toplevel-repo");
-		html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
-		html_txt(ctx.repo->name);
-		html_link_close();
+		cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
 		html("</td><td>");
 		html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
 		html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc);
@@ -145,9 +143,7 @@ 		print_modtime(ctx.repo);
 		html("</td>");
 		if (ctx.cfg.enable_index_links) {
 			html("<td>");
-			html_link_open(cgit_repourl(ctx.repo->url),
-				       NULL, "button");
-			html("summary</a>");
+			cgit_summary_link("summary", NULL, "button", NULL);
 			cgit_log_link("log", NULL, "button", NULL, NULL, NULL,
 				      0, NULL, NULL);
 			cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL);




diff --git a/ui-shared.c b/ui-shared.c
index ee3f6fefef3578391e7ba354f007884bf6baec04..1fc5c0978bde754ce540285cc9300ca84159d2bf 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -603,8 +603,7 @@ 	html("");
 	if (ctx->repo) {
 		cgit_index_link("index", NULL, NULL, NULL, 0);
 		html(" : ");
-		reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"),
-			    ctx->qry.head, NULL, NULL);
+		cgit_summary_link(ctx->repo->name, ctx->repo->name, NULL, NULL);
 		html("</td><td class='form'>");
 		html("<form method='get' action=''>\n");
 		add_hidden_formfields(0, 1, ctx->qry.page);
@@ -632,8 +631,8 @@ 	html("\n");
 
 	html("<table class='tabs'><tr><td>\n");
 	if (ctx->repo) {
-		reporevlink(NULL, "summary", NULL, hc(cmd, "summary"),
-			    ctx->qry.head, NULL, NULL);
+		cgit_summary_link(ctx->repo->name, ctx->repo->name, NULL,
+			ctx->qry.head);
 		cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head,
 			       ctx->qry.sha1, NULL);
 		cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head,