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) (side-by-side diff)
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) (show 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
@@ -390,49 +390,49 @@ int print_archive_ref(const char *refname, const unsigned char *sha1,
struct tag *tag;
struct taginfo *info;
struct object *obj;
char buf[256], *url;
unsigned char fileid[20];
int *header = (int *)cb_data;
if (prefixcmp(refname, "refs/archives"))
return 0;
strncpy(buf, refname+14, sizeof(buf));
obj = parse_object(sha1);
if (!obj)
return 1;
if (obj->type == OBJ_TAG) {
tag = lookup_tag(sha1);
if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag)))
return 0;
hashcpy(fileid, tag->tagged->sha1);
} else if (obj->type != OBJ_BLOB) {
return 0;
} else {
hashcpy(fileid, sha1);
}
if (!*header) {
- html("<p><h1>download</h1>");
+ html("<h1>download</h1>\n");
*header = 1;
}
url = cgit_pageurl(cgit_query_repo, "blob",
fmt("id=%s&amp;path=%s", sha1_to_hex(fileid),
buf));
html_link_open(url, NULL, "menu");
html_txt(strlpart(buf, 20));
html_link_close();
return 0;
}
void add_hidden_formfields(int incl_head, int incl_search, char *page)
{
char *url;
if (!cgit_virtual_root) {
url = fmt("%s/%s", cgit_query_repo, page);
if (cgit_query_path)
url = fmt("%s/%s", url, cgit_query_path);
html_hidden("url", url);
}
if (incl_head && strcmp(cgit_query_head, cgit_repo->defbranch))
html_hidden("h", cgit_query_head);