all repos — cgit @ c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5

a hyperfast web frontend for git written in c

ui: Remember to print ampersand as proper html entities.
William Bell william.bell@frog.za.net
Tue, 09 Oct 2012 20:45:58 +0200
commit

c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5

parent

fdfb6a6d802d6b91061296eda9848d5819760d01

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

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

@@ -104,7 +104,7 @@ void print_sort_header(const char *title, const char *sort)

{ htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort); if (ctx.qry.search) { - html("&q="); + html("&amp;q="); html_url_arg(ctx.qry.search); } htmlf("'>%s</a></th>", title);
M ui-shared.cui-shared.c

@@ -83,7 +83,7 @@ delim = "?";

} else { tmp = fmt("?url=%s/%s/%s", reponame, pagename, (filename ? filename : "")); - delim = "&"; + delim = "&amp;"; } if (query) tmp = fmt("%s%s%s", tmp, delim, query);

@@ -146,19 +146,19 @@ html(ctx.cfg.script_name);

if (page) { htmlf("?p=%s", page); - delim = "&"; + delim = "&amp;"; } if (search) { html(delim); html("q="); html_attr(search); - delim = "&"; + delim = "&amp;"; } if (sort) { html(delim); html("s="); html_attr(sort); - delim = "&"; + delim = "&amp;"; } if (ofs) { html(delim);

@@ -298,13 +298,13 @@ if (rev && ctx.qry.head && strcmp(rev, ctx.qry.head)) {

html(delim); html("id="); html_url_arg(rev); - delim = "&"; + delim = "&amp;"; } if (grep && pattern) { html(delim); html("qt="); html_url_arg(grep); - delim = "&"; + delim = "&amp;"; html(delim); html("q="); html_url_arg(pattern);

@@ -313,7 +313,7 @@ if (ofs > 0) {

html(delim); html("ofs="); htmlf("%d", ofs); - delim = "&"; + delim = "&amp;"; } if (showmsg) { html(delim);