aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
authorGravatar William Bell <william.bell@frog.za.net>2012-10-10 03:45:58 (JST)
committerGravatar Jason A. Donenfeld <Jason@zx2c4.com>2012-10-17 23:30:02 (JST)
commitc366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5 (patch)
treecf00ee9a076ae721fbad53ade0189f7f97da1848 /ui-shared.c
parentfdfb6a6d802d6b91061296eda9848d5819760d01 (diff)
downloadcgit-c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5.zip
cgit-c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5.tar.gz
ui: Remember to print ampersand as proper html entities.
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 43166af..d9d5da7 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -83,7 +83,7 @@ char *cgit_fileurl(const char *reponame, const char *pagename,
83 } else { 83 } else {
84 tmp = fmt("?url=%s/%s/%s", reponame, pagename, 84 tmp = fmt("?url=%s/%s/%s", reponame, pagename,
85 (filename ? filename : "")); 85 (filename ? filename : ""));
86 delim = "&"; 86 delim = "&amp;";
87 } 87 }
88 if (query) 88 if (query)
89 tmp = fmt("%s%s%s", tmp, delim, query); 89 tmp = fmt("%s%s%s", tmp, delim, query);
@@ -146,19 +146,19 @@ static void site_url(const char *page, const char *search, const char *sort, int
146 146
147 if (page) { 147 if (page) {
148 htmlf("?p=%s", page); 148 htmlf("?p=%s", page);
149 delim = "&"; 149 delim = "&amp;";
150 } 150 }
151 if (search) { 151 if (search) {
152 html(delim); 152 html(delim);
153 html("q="); 153 html("q=");
154 html_attr(search); 154 html_attr(search);
155 delim = "&"; 155 delim = "&amp;";
156 } 156 }
157 if (sort) { 157 if (sort) {
158 html(delim); 158 html(delim);
159 html("s="); 159 html("s=");
160 html_attr(sort); 160 html_attr(sort);
161 delim = "&"; 161 delim = "&amp;";
162 } 162 }
163 if (ofs) { 163 if (ofs) {
164 html(delim); 164 html(delim);
@@ -298,13 +298,13 @@ void cgit_log_link(const char *name, const char *title, const char *class,
298 html(delim); 298 html(delim);
299 html("id="); 299 html("id=");
300 html_url_arg(rev); 300 html_url_arg(rev);
301 delim = "&"; 301 delim = "&amp;";
302 } 302 }
303 if (grep && pattern) { 303 if (grep && pattern) {
304 html(delim); 304 html(delim);
305 html("qt="); 305 html("qt=");
306 html_url_arg(grep); 306 html_url_arg(grep);
307 delim = "&"; 307 delim = "&amp;";
308 html(delim); 308 html(delim);
309 html("q="); 309 html("q=");
310 html_url_arg(pattern); 310 html_url_arg(pattern);
@@ -313,7 +313,7 @@ void cgit_log_link(const char *name, const char *title, const char *class,
313 html(delim); 313 html(delim);
314 html("ofs="); 314 html("ofs=");
315 htmlf("%d", ofs); 315 htmlf("%d", ofs);
316 delim = "&"; 316 delim = "&amp;";
317 } 317 }
318 if (showmsg) { 318 if (showmsg) {
319 html(delim); 319 html(delim);