aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
authorLars Hjemli2008-10-05 16:54:44 +0200
committerLars Hjemli2008-10-05 16:54:44 +0200
commit44b208aa44c4cdf7e1e339bbd5b028c23da55a46 (patch)
tree74ead4787c7c7507845bfd8504691f07384d1604 /ui-shared.c
parent22a597e56dc7fdea78ccbcb7466b45dd62cf7b32 (diff)
downloadcgit-44b208aa44c4cdf7e1e339bbd5b028c23da55a46.tar.gz
cgit-44b208aa44c4cdf7e1e339bbd5b028c23da55a46.tar.bz2
cgit-44b208aa44c4cdf7e1e339bbd5b028c23da55a46.zip
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 (limited to 'ui-shared.c')
-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
@@ -206,17 +206,17 @@ static char *repolink(char *title, char *class, char *page, char *head,
206 } 206 }
207 html(" href='"); 207 html(" href='");
208 if (ctx.cfg.virtual_root) { 208 if (ctx.cfg.virtual_root) {
209 html_attr(ctx.cfg.virtual_root); 209 html_url_path(ctx.cfg.virtual_root);
210 if (ctx.cfg.virtual_root[strlen(ctx.cfg.virtual_root) - 1] != '/') 210 if (ctx.cfg.virtual_root[strlen(ctx.cfg.virtual_root) - 1] != '/')
211 html("/"); 211 html("/");
212 html_attr(ctx.repo->url); 212 html_url_path(ctx.repo->url);
213 if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/') 213 if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/')
214 html("/"); 214 html("/");
215 if (page) { 215 if (page) {
216 html(page); 216 html_url_path(page);
217 html("/"); 217 html("/");
218 if (path) 218 if (path)
219 html_attr(path); 219 html_url_path(path);
220 } 220 }
221 } else { 221 } else {
222 html(ctx.cfg.script_name); 222 html(ctx.cfg.script_name);