summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-01 03:30:55 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-01 04:19:32 (EDT)
commit3f34988f2a83b70ceb1727c8f0b73413b42877ee (patch)
treedd2309da8fc0a6a89719078cdd27be905213284d
parent352f786db4c46e8c63dc91e1cb5db575aafe3fbf (diff)
downloadmarquee-3f34988f2a83b70ceb1727c8f0b73413b42877ee.zip
marquee-3f34988f2a83b70ceb1727c8f0b73413b42877ee.tar.gz
marquee-3f34988f2a83b70ceb1727c8f0b73413b42877ee.tar.bz2
mq_html_input_*(): Close <label>s
-rw-r--r--src/html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/html.c b/src/html.c
index 8fa89b9..6445abf 100644
--- a/src/html.c
+++ b/src/html.c
@@ -306,7 +306,8 @@ gchar *
mq_html_input_text(const gchar *name, const gchar *label, const gchar *value)
{
return g_strdup_printf("<label for=\"%s\"><span>%s</span>"
- "<input type=\"text\" name=\"%s\" id=\"%s\" value=\"%s\">\n",
+ "<input type=\"text\" name=\"%s\" id=\"%s\" value=\"%s\">"
+ "</label>\n",
name, label, name, name, value ? value : "");
}
@@ -314,7 +315,7 @@ gchar *
mq_html_input_radio(const gchar *name, const gchar *label, gboolean checked)
{
return g_strdup_printf("<label for=\"%s\"><span>%s</span>"
- "<input type=\"checkbox\" name=\"%s\" id=\"%s\"%s>\n",
+ "<input type=\"checkbox\" name=\"%s\" id=\"%s\"%s></label>\n",
name, label, name, name, checked ? " checked=\"checked\"" : "");
}
@@ -322,6 +323,6 @@ gchar *
mq_html_input_checkbox(const gchar *name, const gchar *label, gboolean checked)
{
return g_strdup_printf("<label for=\"%s\"><span>%s</span>"
- "<input type=\"radio\" name=\"%s\" id=\"%s\"%s>\n",
+ "<input type=\"radio\" name=\"%s\" id=\"%s\"%s></label>\n",
name, label, name, name, checked ? " checked=\"checked\"" : "");
}