timprove HTML output, <form> should be outside table, use <br/> - vote - simple… | |
git clone git://src.adamsgaard.dk/vote | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit b1543e65991695c6b455382a9a9b86b1bec42a6c | |
parent f5592f94b672d1c35cb7e58f1aa1d5104c4331c3 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sun, 4 Oct 2020 15:49:41 +0200 | |
improve HTML output, <form> should be outside table, use <br/> | |
Signed-off-by: Anders Damsgaard <[email protected]> | |
Diffstat: | |
M vote.c | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/vote.c b/vote.c | |
t@@ -111,12 +111,13 @@ print_poll_line(char *line, size_t *i, int intable, int … | |
if (sscanf(line, "%ld\t%4095s", &c, options) == 2) { | |
if (!intable) { | |
- puts("</p>\n<table>"); | |
+ puts("</p>"); | |
if (vote) { | |
puts("<form method=\"get\" action=\"\">"); | |
printf("<input type=\"hidden\" name=\"poll\" " | |
"value=\"%s\" />\n", poll); | |
} | |
+ puts("<table>"); | |
} | |
if (vote) { | |
printf("\t<tr><td class=\"choice\">"); | |
t@@ -129,8 +130,7 @@ print_poll_line(char *line, size_t *i, int intable, int vo… | |
c, options); | |
return 1; | |
} else { | |
- | |
- printf("%s<br>\n", line); | |
+ printf("%s<br/>\n", line); | |
return 0; | |
} | |
} |