all repos — cgit @ 2e884f3162771880a2a5260713d6b7d1aa25bc6f

a hyperfast web frontend for git written in c

ui-shared: use html_url_path() to get properly escaped url in form action

When a repo uses an url with e.g. '#' or '?' characters this needs to be
properly escaped when used as action in a form tag.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 05 Oct 2008 19:25:47 +0200
commit

2e884f3162771880a2a5260713d6b7d1aa25bc6f

parent

b7f33786ef4b155a11b0324f84bbde5d7fc9c998

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M ui-shared.cui-shared.c

@@ -649,8 +649,8 @@ NULL);

html("</td><td class='form'>"); html("<form class='right' method='get' action='"); if (ctx->cfg.virtual_root) - html_attr(cgit_fileurl(ctx->qry.repo, "log", - ctx->qry.path, NULL)); + html_url_path(cgit_fileurl(ctx->qry.repo, "log", + ctx->qry.path, NULL)); html("'>\n"); add_hidden_formfields(1, 0, "log"); html("<select name='qt'>\n");