summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2007-11-11 12:44:39 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-11-11 12:44:39 (UTC)
commit1b7c5b2e0b918e9452694aace7c19194683989a8 (patch) (unidiff)
treeefdb7947afbbe1862c6c54ecdce303a6c3772117
parenta7cf406c802394460cb14c79f3f43582d1428a45 (diff)
downloadcgit-1b7c5b2e0b918e9452694aace7c19194683989a8.zip
cgit-1b7c5b2e0b918e9452694aace7c19194683989a8.tar.gz
cgit-1b7c5b2e0b918e9452694aace7c19194683989a8.tar.bz2
Generate valid html for "downloads" menu header
Noticed-by: http://validator.w3.org Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 9ec646b..5192800 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -402,25 +402,25 @@ int print_archive_ref(const char *refname, const unsigned char *sha1,
402 return 1; 402 return 1;
403 if (obj->type == OBJ_TAG) { 403 if (obj->type == OBJ_TAG) {
404 tag = lookup_tag(sha1); 404 tag = lookup_tag(sha1);
405 if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) 405 if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag)))
406 return 0; 406 return 0;
407 hashcpy(fileid, tag->tagged->sha1); 407 hashcpy(fileid, tag->tagged->sha1);
408 } else if (obj->type != OBJ_BLOB) { 408 } else if (obj->type != OBJ_BLOB) {
409 return 0; 409 return 0;
410 } else { 410 } else {
411 hashcpy(fileid, sha1); 411 hashcpy(fileid, sha1);
412 } 412 }
413 if (!*header) { 413 if (!*header) {
414 html("<p><h1>download</h1>"); 414 html("<h1>download</h1>\n");
415 *header = 1; 415 *header = 1;
416 } 416 }
417 url = cgit_pageurl(cgit_query_repo, "blob", 417 url = cgit_pageurl(cgit_query_repo, "blob",
418 fmt("id=%s&amp;path=%s", sha1_to_hex(fileid), 418 fmt("id=%s&amp;path=%s", sha1_to_hex(fileid),
419 buf)); 419 buf));
420 html_link_open(url, NULL, "menu"); 420 html_link_open(url, NULL, "menu");
421 html_txt(strlpart(buf, 20)); 421 html_txt(strlpart(buf, 20));
422 html_link_close(); 422 html_link_close();
423 return 0; 423 return 0;
424} 424}
425 425
426void add_hidden_formfields(int incl_head, int incl_search, char *page) 426void add_hidden_formfields(int incl_head, int incl_search, char *page)