]> git.cameronkatri.com Git - cgit.git/commitdiff
ui-shared.c: use html_url_path() in repolink()
authorLars Hjemli <hjemli@gmail.com>
Sun, 5 Oct 2008 14:54:44 +0000 (16:54 +0200)
committerLars Hjemli <hjemli@gmail.com>
Sun, 5 Oct 2008 14:54:44 +0000 (16:54 +0200)
This makes sure that reponames and paths are properly escaped when used
as urls.

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

index a2f636c73d9dfb6da5b3e091ba8acdcbe2d5823a..2eddd2d14cf8c769c1bf6f3ad2c567580cd5027d 100644 (file)
@@ -206,17 +206,17 @@ static char *repolink(char *title, char *class, char *page, char *head,
        }
        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);