mirror of
https://git.zx2c4.com/cgit
synced 2024-11-26 02:18:42 +00:00
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>
This commit is contained in:
parent
22a597e56d
commit
44b208aa44
@ -206,17 +206,17 @@ static char *repolink(char *title, char *class, char *page, char *head,
|
|||||||
}
|
}
|
||||||
html(" href='");
|
html(" href='");
|
||||||
if (ctx.cfg.virtual_root) {
|
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] != '/')
|
if (ctx.cfg.virtual_root[strlen(ctx.cfg.virtual_root) - 1] != '/')
|
||||||
html("/");
|
html("/");
|
||||||
html_attr(ctx.repo->url);
|
html_url_path(ctx.repo->url);
|
||||||
if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/')
|
if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/')
|
||||||
html("/");
|
html("/");
|
||||||
if (page) {
|
if (page) {
|
||||||
html(page);
|
html_url_path(page);
|
||||||
html("/");
|
html("/");
|
||||||
if (path)
|
if (path)
|
||||||
html_attr(path);
|
html_url_path(path);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
html(ctx.cfg.script_name);
|
html(ctx.cfg.script_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user