diff options
author | William Bell | 2012-10-09 20:45:58 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2012-10-17 16:30:02 +0200 |
commit | c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5 (patch) | |
tree | cf00ee9a076ae721fbad53ade0189f7f97da1848 | |
parent | fdfb6a6d802d6b91061296eda9848d5819760d01 (diff) | |
download | cgit-c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5.tar.gz cgit-c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5.tar.bz2 cgit-c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5.zip |
ui: Remember to print ampersand as proper html entities.
-rw-r--r-- | ui-repolist.c | 2 | ||||
-rw-r--r-- | ui-shared.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index c774632..36c067a 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -104,7 +104,7 @@ void print_sort_header(const char *title, const char *sort) | |||
104 | { | 104 | { |
105 | htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort); | 105 | htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort); |
106 | if (ctx.qry.search) { | 106 | if (ctx.qry.search) { |
107 | html("&q="); | 107 | html("&q="); |
108 | html_url_arg(ctx.qry.search); | 108 | html_url_arg(ctx.qry.search); |
109 | } | 109 | } |
110 | htmlf("'>%s</a></th>", title); | 110 | htmlf("'>%s</a></th>", title); |
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 = "&"; |
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 = "&"; |
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 = "&"; |
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 = "&"; |
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 = "&"; |
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 = "&"; |
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 = "&"; |
317 | } | 317 | } |
318 | if (showmsg) { | 318 | if (showmsg) { |
319 | html(delim); | 319 | html(delim); |