author | Lars Hjemli <hjemli@gmail.com> | 2007-06-16 19:35:58 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-06-16 19:35:58 (UTC) |
commit | f91b9696a36008c245a3195800ba0c5fa3e890f9 (patch) (unidiff) | |
tree | c064e555881d3b426b73fd841531a19c064a9984 | |
parent | ffc69736a606fd8f9a10468cce48b9a37b428944 (diff) | |
download | cgit-f91b9696a36008c245a3195800ba0c5fa3e890f9.zip cgit-f91b9696a36008c245a3195800ba0c5fa3e890f9.tar.gz cgit-f91b9696a36008c245a3195800ba0c5fa3e890f9.tar.bz2 |
ui-tree: make blob viewer generate valid html
A leftover '</td></tr>' made ui-tree generate invalid html for blob
content. Fix it.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-tree.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -38,25 +38,24 @@ static void print_object(const unsigned char *sha1, char *path) | |||
38 | lineno = 0; | 38 | lineno = 0; |
39 | while(idx < size) { | 39 | while(idx < size) { |
40 | if (buf[idx] == '\n') { | 40 | if (buf[idx] == '\n') { |
41 | buf[idx] = '\0'; | 41 | buf[idx] = '\0'; |
42 | htmlf("<tr><td class='no'>%d</td><td class='txt'>", | 42 | htmlf("<tr><td class='no'>%d</td><td class='txt'>", |
43 | ++lineno); | 43 | ++lineno); |
44 | html_txt(buf + start); | 44 | html_txt(buf + start); |
45 | html("</td></tr>\n"); | 45 | html("</td></tr>\n"); |
46 | start = idx + 1; | 46 | start = idx + 1; |
47 | } | 47 | } |
48 | idx++; | 48 | idx++; |
49 | } | 49 | } |
50 | html("\n</td></tr>\n"); | ||
51 | html("</table>\n"); | 50 | html("</table>\n"); |
52 | } | 51 | } |
53 | 52 | ||
54 | 53 | ||
55 | static int ls_item(const unsigned char *sha1, const char *base, int baselen, | 54 | static int ls_item(const unsigned char *sha1, const char *base, int baselen, |
56 | const char *pathname, unsigned int mode, int stage) | 55 | const char *pathname, unsigned int mode, int stage) |
57 | { | 56 | { |
58 | char *name; | 57 | char *name; |
59 | enum object_type type; | 58 | enum object_type type; |
60 | unsigned long size = 0; | 59 | unsigned long size = 0; |
61 | char *url, *qry; | 60 | char *url, *qry; |
62 | 61 | ||