author | Ondrej Jirman <ondrej.jirman@zonio.net> | 2007-05-25 23:15:10 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-31 08:18:38 (UTC) |
commit | 1a63cfcc3d83919e790e7e279eb35fc75adb0e3c (patch) (unidiff) | |
tree | a2c613c6ae642dd6a4015142ccf04ed7c5629b8f | |
parent | 0928d8827a714f3908efa7eb9eb4cde28761af26 (diff) | |
download | cgit-1a63cfcc3d83919e790e7e279eb35fc75adb0e3c.zip cgit-1a63cfcc3d83919e790e7e279eb35fc75adb0e3c.tar.gz cgit-1a63cfcc3d83919e790e7e279eb35fc75adb0e3c.tar.bz2 |
Use & instead of & in URLs.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-commit.c | 8 | ||||
-rw-r--r-- | ui-log.c | 4 | ||||
-rw-r--r-- | ui-shared.c | 4 | ||||
-rw-r--r-- | ui-summary.c | 2 | ||||
-rw-r--r-- | ui-tree.c | 6 | ||||
-rw-r--r-- | ui-view.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/ui-commit.c b/ui-commit.c index 6b135aa..1d12bbb 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -72,13 +72,13 @@ void print_fileinfo(struct fileinfo *info) | |||
72 | !is_null_sha1(info->new_sha1)) { | 72 | !is_null_sha1(info->new_sha1)) { |
73 | html("<span class='modechange'>["); | 73 | html("<span class='modechange'>["); |
74 | html_filemode(info->old_mode); | 74 | html_filemode(info->old_mode); |
75 | html("]</span>"); | 75 | html("]</span>"); |
76 | } | 76 | } |
77 | htmlf("</td><td class='%s'>", class); | 77 | htmlf("</td><td class='%s'>", class); |
78 | query = fmt("id=%s&id2=%s&path=%s", sha1_to_hex(info->old_sha1), | 78 | query = fmt("id=%s&id2=%s&path=%s", sha1_to_hex(info->old_sha1), |
79 | sha1_to_hex(info->new_sha1), info->new_path); | 79 | sha1_to_hex(info->new_sha1), info->new_path); |
80 | html_link_open(cgit_pageurl(cgit_query_repo, "diff", query), | 80 | html_link_open(cgit_pageurl(cgit_query_repo, "diff", query), |
81 | NULL, NULL); | 81 | NULL, NULL); |
82 | if (info->status == DIFF_STATUS_COPIED || | 82 | if (info->status == DIFF_STATUS_COPIED || |
83 | info->status == DIFF_STATUS_RENAMED) { | 83 | info->status == DIFF_STATUS_RENAMED) { |
84 | html_txt(info->new_path); | 84 | html_txt(info->new_path); |
@@ -179,13 +179,13 @@ void cgit_print_commit(const char *hex) | |||
179 | html(" "); | 179 | html(" "); |
180 | html_txt(info->committer_email); | 180 | html_txt(info->committer_email); |
181 | html("</td><td class='right'>"); | 181 | html("</td><td class='right'>"); |
182 | cgit_print_date(info->committer_date, FMT_LONGDATE); | 182 | cgit_print_date(info->committer_date, FMT_LONGDATE); |
183 | html("</td></tr>\n"); | 183 | html("</td></tr>\n"); |
184 | html("<tr><th>tree</th><td colspan='2' class='sha1'><a href='"); | 184 | html("<tr><th>tree</th><td colspan='2' class='sha1'><a href='"); |
185 | query = fmt("h=%s&id=%s", sha1_to_hex(commit->object.sha1), | 185 | query = fmt("h=%s&id=%s", sha1_to_hex(commit->object.sha1), |
186 | sha1_to_hex(commit->tree->object.sha1)); | 186 | sha1_to_hex(commit->tree->object.sha1)); |
187 | html_attr(cgit_pageurl(cgit_query_repo, "tree", query)); | 187 | html_attr(cgit_pageurl(cgit_query_repo, "tree", query)); |
188 | htmlf("'>%s</a></td></tr>\n", sha1_to_hex(commit->tree->object.sha1)); | 188 | htmlf("'>%s</a></td></tr>\n", sha1_to_hex(commit->tree->object.sha1)); |
189 | for (p = commit->parents; p ; p = p->next) { | 189 | for (p = commit->parents; p ; p = p->next) { |
190 | parent = lookup_commit_reference(p->item->object.sha1); | 190 | parent = lookup_commit_reference(p->item->object.sha1); |
191 | if (!parent) { | 191 | if (!parent) { |
@@ -198,22 +198,22 @@ void cgit_print_commit(const char *hex) | |||
198 | "<td colspan='2' class='sha1'>" | 198 | "<td colspan='2' class='sha1'>" |
199 | "<a href='"); | 199 | "<a href='"); |
200 | query = fmt("h=%s", sha1_to_hex(p->item->object.sha1)); | 200 | query = fmt("h=%s", sha1_to_hex(p->item->object.sha1)); |
201 | html_attr(cgit_pageurl(cgit_query_repo, "commit", query)); | 201 | html_attr(cgit_pageurl(cgit_query_repo, "commit", query)); |
202 | htmlf("'>%s</a> (<a href='", | 202 | htmlf("'>%s</a> (<a href='", |
203 | sha1_to_hex(p->item->object.sha1)); | 203 | sha1_to_hex(p->item->object.sha1)); |
204 | query = fmt("id=%s&id2=%s", sha1_to_hex(parent->tree->object.sha1), | 204 | query = fmt("id=%s&id2=%s", sha1_to_hex(parent->tree->object.sha1), |
205 | sha1_to_hex(commit->tree->object.sha1)); | 205 | sha1_to_hex(commit->tree->object.sha1)); |
206 | html_attr(cgit_pageurl(cgit_query_repo, "diff", query)); | 206 | html_attr(cgit_pageurl(cgit_query_repo, "diff", query)); |
207 | html("'>diff</a>)</td></tr>"); | 207 | html("'>diff</a>)</td></tr>"); |
208 | } | 208 | } |
209 | if (cgit_repo->snapshots) { | 209 | if (cgit_repo->snapshots) { |
210 | htmlf("<tr><th>download</th><td colspan='2' class='sha1'><a href='"); | 210 | htmlf("<tr><th>download</th><td colspan='2' class='sha1'><a href='"); |
211 | filename = fmt("%s-%s.zip", cgit_query_repo, hex); | 211 | filename = fmt("%s-%s.zip", cgit_query_repo, hex); |
212 | html_attr(cgit_pageurl(cgit_query_repo, "snapshot", | 212 | html_attr(cgit_pageurl(cgit_query_repo, "snapshot", |
213 | fmt("id=%s&name=%s", hex, filename))); | 213 | fmt("id=%s&name=%s", hex, filename))); |
214 | htmlf("'>%s</a></td></tr>", filename); | 214 | htmlf("'>%s</a></td></tr>", filename); |
215 | } | 215 | } |
216 | html("</table>\n"); | 216 | html("</table>\n"); |
217 | html("<div class='commit-subject'>"); | 217 | html("<div class='commit-subject'>"); |
218 | html_txt(info->subject); | 218 | html_txt(info->subject); |
219 | html("</div>"); | 219 | html("</div>"); |
@@ -111,18 +111,18 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path) | |||
111 | html("</table>\n"); | 111 | html("</table>\n"); |
112 | 112 | ||
113 | html("<div class='pager'>"); | 113 | html("<div class='pager'>"); |
114 | if (ofs > 0) { | 114 | if (ofs > 0) { |
115 | html(" <a href='"); | 115 | html(" <a href='"); |
116 | html(cgit_pageurl(cgit_query_repo, cgit_query_page, | 116 | html(cgit_pageurl(cgit_query_repo, cgit_query_page, |
117 | fmt("h=%s&ofs=%d", tip, ofs-cnt))); | 117 | fmt("h=%s&ofs=%d", tip, ofs-cnt))); |
118 | html("'>[prev]</a> "); | 118 | html("'>[prev]</a> "); |
119 | } | 119 | } |
120 | 120 | ||
121 | if ((commit = get_revision(&rev)) != NULL) { | 121 | if ((commit = get_revision(&rev)) != NULL) { |
122 | html(" <a href='"); | 122 | html(" <a href='"); |
123 | html(cgit_pageurl(cgit_query_repo, "log", | 123 | html(cgit_pageurl(cgit_query_repo, "log", |
124 | fmt("h=%s&ofs=%d", tip, ofs+cnt))); | 124 | fmt("h=%s&ofs=%d", tip, ofs+cnt))); |
125 | html("'>[next]</a> "); | 125 | html("'>[next]</a> "); |
126 | } | 126 | } |
127 | html("</div>"); | 127 | html("</div>"); |
128 | } | 128 | } |
diff --git a/ui-shared.c b/ui-shared.c index c8c1c21..aba93e8 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -66,15 +66,15 @@ char *cgit_pageurl(const char *reponame, const char *pagename, | |||
66 | pagename, query); | 66 | pagename, query); |
67 | else | 67 | else |
68 | return fmt("%s/%s/%s/", cgit_virtual_root, reponame, | 68 | return fmt("%s/%s/%s/", cgit_virtual_root, reponame, |
69 | pagename); | 69 | pagename); |
70 | } else { | 70 | } else { |
71 | if (query) | 71 | if (query) |
72 | return fmt("?r=%s&p=%s&%s", reponame, pagename, query); | 72 | return fmt("?r=%s&p=%s&%s", reponame, pagename, query); |
73 | else | 73 | else |
74 | return fmt("?r=%s&p=%s", reponame, pagename); | 74 | return fmt("?r=%s&p=%s", reponame, pagename); |
75 | } | 75 | } |
76 | } | 76 | } |
77 | 77 | ||
78 | char *cgit_currurl() | 78 | char *cgit_currurl() |
79 | { | 79 | { |
80 | if (!cgit_virtual_root) | 80 | if (!cgit_virtual_root) |
diff --git a/ui-summary.c b/ui-summary.c index 18608b8..15e8aec 100644 --- a/ui-summary.c +++ b/ui-summary.c | |||
@@ -156,13 +156,13 @@ static int cgit_print_archive_cb(const char *refname, const unsigned char *sha1, | |||
156 | html("<table id='downloads'>"); | 156 | html("<table id='downloads'>"); |
157 | html("<tr><th>Downloads</th></tr>"); | 157 | html("<tr><th>Downloads</th></tr>"); |
158 | header = 1; | 158 | header = 1; |
159 | } | 159 | } |
160 | html("<tr><td>"); | 160 | html("<tr><td>"); |
161 | url = cgit_pageurl(cgit_query_repo, "blob", | 161 | url = cgit_pageurl(cgit_query_repo, "blob", |
162 | fmt("id=%s&path=%s", sha1_to_hex(fileid), | 162 | fmt("id=%s&path=%s", sha1_to_hex(fileid), |
163 | buf)); | 163 | buf)); |
164 | html_link_open(url, NULL, NULL); | 164 | html_link_open(url, NULL, NULL); |
165 | html_txt(buf); | 165 | html_txt(buf); |
166 | html_link_close(); | 166 | html_link_close(); |
167 | html("</td></tr>"); | 167 | html("</td></tr>"); |
168 | return 0; | 168 | return 0; |
@@ -34,31 +34,31 @@ static int print_entry(const unsigned char *sha1, const char *base, | |||
34 | html_attr(fmt(cgit_repo->module_link, | 34 | html_attr(fmt(cgit_repo->module_link, |
35 | name, | 35 | name, |
36 | sha1_to_hex(sha1))); | 36 | sha1_to_hex(sha1))); |
37 | } else if (S_ISDIR(mode)) { | 37 | } else if (S_ISDIR(mode)) { |
38 | html("class='ls-dir'><a href='"); | 38 | html("class='ls-dir'><a href='"); |
39 | html_attr(cgit_pageurl(cgit_query_repo, "tree", | 39 | html_attr(cgit_pageurl(cgit_query_repo, "tree", |
40 | fmt("h=%s&id=%s&path=%s%s/", | 40 | fmt("h=%s&id=%s&path=%s%s/", |
41 | curr_rev, | 41 | curr_rev, |
42 | sha1_to_hex(sha1), | 42 | sha1_to_hex(sha1), |
43 | cgit_query_path ? cgit_query_path : "", | 43 | cgit_query_path ? cgit_query_path : "", |
44 | pathname))); | 44 | pathname))); |
45 | } else { | 45 | } else { |
46 | html("class='ls-blob'><a href='"); | 46 | html("class='ls-blob'><a href='"); |
47 | html_attr(cgit_pageurl(cgit_query_repo, "view", | 47 | html_attr(cgit_pageurl(cgit_query_repo, "view", |
48 | fmt("h=%s&id=%s&path=%s%s", curr_rev, | 48 | fmt("h=%s&id=%s&path=%s%s", curr_rev, |
49 | sha1_to_hex(sha1), | 49 | sha1_to_hex(sha1), |
50 | cgit_query_path ? cgit_query_path : "", | 50 | cgit_query_path ? cgit_query_path : "", |
51 | pathname))); | 51 | pathname))); |
52 | } | 52 | } |
53 | htmlf("'>%s</a></td>", name); | 53 | htmlf("'>%s</a></td>", name); |
54 | htmlf("<td class='filesize'>%li</td>", size); | 54 | htmlf("<td class='filesize'>%li</td>", size); |
55 | 55 | ||
56 | html("<td class='links'><a href='"); | 56 | html("<td class='links'><a href='"); |
57 | html_attr(cgit_pageurl(cgit_query_repo, "log", | 57 | html_attr(cgit_pageurl(cgit_query_repo, "log", |
58 | fmt("h=%s&path=%s%s", | 58 | fmt("h=%s&path=%s%s", |
59 | curr_rev, | 59 | curr_rev, |
60 | cgit_query_path ? cgit_query_path : "", | 60 | cgit_query_path ? cgit_query_path : "", |
61 | pathname))); | 61 | pathname))); |
62 | html("'>history</a></td>"); | 62 | html("'>history</a></td>"); |
63 | html("</tr>\n"); | 63 | html("</tr>\n"); |
64 | free(name); | 64 | free(name); |
@@ -40,13 +40,13 @@ void cgit_print_view(const char *hex, char *path) | |||
40 | htmlf("%s %s, %li bytes", typename(type), hex, size); | 40 | htmlf("%s %s, %li bytes", typename(type), hex, size); |
41 | if (path) | 41 | if (path) |
42 | html(")"); | 42 | html(")"); |
43 | 43 | ||
44 | html(" <a href='"); | 44 | html(" <a href='"); |
45 | html_attr(cgit_pageurl(cgit_query_repo, "blob", | 45 | html_attr(cgit_pageurl(cgit_query_repo, "blob", |
46 | fmt("id=%s&path=%s", | 46 | fmt("id=%s&path=%s", |
47 | hex, | 47 | hex, |
48 | path))); | 48 | path))); |
49 | html("'>download</a>"); | 49 | html("'>download</a>"); |
50 | html("</th></tr>\n"); | 50 | html("</th></tr>\n"); |
51 | html("<tr><td class='blob'>\n"); | 51 | html("<tr><td class='blob'>\n"); |
52 | html_txt(buf); | 52 | html_txt(buf); |