summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2008-10-05 14:54:44 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-10-05 14:54:44 (UTC)
commit44b208aa44c4cdf7e1e339bbd5b028c23da55a46 (patch) (side-by-side diff)
tree74ead4787c7c7507845bfd8504691f07384d1604
parent22a597e56dc7fdea78ccbcb7466b45dd62cf7b32 (diff)
downloadcgit-44b208aa44c4cdf7e1e339bbd5b028c23da55a46.zip
cgit-44b208aa44c4cdf7e1e339bbd5b028c23da55a46.tar.gz
cgit-44b208aa44c4cdf7e1e339bbd5b028c23da55a46.tar.bz2
ui-shared.c: use html_url_path() in repolink()
This makes sure that reponames and paths are properly escaped when used as urls. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-shared.c b/ui-shared.c
index a2f636c..2eddd2d 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -197,35 +197,35 @@ static char *repolink(char *title, char *class, char *page, char *head,
if (title) {
html(" title='");
html_attr(title);
html("'");
}
if (class) {
html(" class='");
html_attr(class);
html("'");
}
html(" href='");
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] != '/')
html("/");
if (page) {
- html(page);
+ html_url_path(page);
html("/");
if (path)
- html_attr(path);
+ html_url_path(path);
}
} else {
html(ctx.cfg.script_name);
html("?url=");
html_url_arg(ctx.repo->url);
if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/')
html("/");
if (page) {
html_url_arg(page);
html("/");
if (path)
html_url_arg(path);