summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
authorLars Hjemli <hjemli@gmail.com>2008-10-05 15:16:48 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-10-05 15:16:48 (UTC)
commitc6bea0375aa7898ea3229483741944303740801e (patch) (side-by-side diff)
tree249000a4b85dbab2a7067042f9d835bc0a5e5f8f /ui-shared.c
parent20c895f6889a66d7cf43c67a7c22df6ef324ed5d (diff)
parent49ecbbddf0659c6409befcfe8989f92196133cda (diff)
downloadcgit-c6bea0375aa7898ea3229483741944303740801e.zip
cgit-c6bea0375aa7898ea3229483741944303740801e.tar.gz
cgit-c6bea0375aa7898ea3229483741944303740801e.tar.bz2
Merge branch 'lh/escape-urls'
* lh/escape-urls: ui-repolist + ui-shared: Use cgit_summary_link() ui-shared.c: add cgit_summary_link() ui-shared.c: use html_url_path() in repolink() html.c: add html_url_path
Diffstat (limited to 'ui-shared.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-shared.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/ui-shared.c b/ui-shared.c
index a2f636c..1fc5c09 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -208,6 +208,6 @@ static char *repolink(char *title, char *class, char *page, char *head,
if (ctx.cfg.virtual_root) {
- html_attr(ctx.cfg.virtual_root);
+ html_url_path(ctx.cfg.virtual_root);
if (ctx.cfg.virtual_root[strlen(ctx.cfg.virtual_root) - 1] != '/')
html("/");
- html_attr(ctx.repo->url);
+ html_url_path(ctx.repo->url);
if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/')
@@ -215,6 +215,6 @@ static char *repolink(char *title, char *class, char *page, char *head,
if (page) {
- html(page);
+ html_url_path(page);
html("/");
if (path)
- html_attr(path);
+ html_url_path(path);
}
@@ -259,2 +259,7 @@ static void reporevlink(char *page, char *name, char *title, char *class,
+void cgit_summary_link(char *name, char *title, char *class, char *head)
+{
+ reporevlink(NULL, name, title, class, head, NULL, NULL);
+}
+
void cgit_tree_link(char *name, char *title, char *class, char *head,
@@ -600,4 +605,3 @@ void cgit_print_pageheader(struct cgit_context *ctx)
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'>");
@@ -629,4 +633,4 @@ void cgit_print_pageheader(struct cgit_context *ctx)
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,