Drop XHTML.
authorEmil Mikulic <emikulic@gmail.com>
Sun, 15 May 2011 09:43:35 +0000 (19:43 +1000)
committerEmil Mikulic <emikulic@gmail.com>
Sat, 28 May 2011 10:10:53 +0000 (20:10 +1000)
We never served it with the right content-type anyway.

graph_db.c
hosts_db.c
html.c

index 63ecc9d..44685e9 100644 (file)
@@ -333,11 +333,11 @@ html_front_page(void)
       "%Y-%m-%d %H:%M:%S %Z%z", localtime(&start_time)) != 0)
       str_appendf(buf, "<b>, since</b> %s", start_when);
 
-   str_appendf(buf,"<b>.</b><br/>\n"
+   str_appendf(buf,"<b>.</b><br>\n"
       "<b>Total</b> <span id=\"tb\">%'qu</span> <b>bytes, "
       "in</b> <span id=\"tp\">%'qu</span> <b>packets.</b> "
       "(<span id=\"pc\">%'u</span> <b>captured,</b> "
-      "<span id=\"pd\">%'u</span> <b>dropped)</b><br/>\n"
+      "<span id=\"pd\">%'u</span> <b>dropped)</b><br>\n"
       "</p>\n",
       total_bytes,
       total_packets,
index b08b886..954daba 100644 (file)
@@ -910,7 +910,7 @@ format_table(struct str *buf, struct hashtable *ht, int start,
    } else
       end = min(ht->count, (uint32_t)start+MAX_ENTRIES);
 
-   str_appendf(buf, "(%u-%u of %u)<br/>\n", start+1, end, ht->count);
+   str_appendf(buf, "(%u-%u of %u)<br>\n", start+1, end, ht->count);
    qsort_buckets(table, ht->count, start, end, sort);
    ht->format_cols_func(buf);
 
@@ -999,7 +999,7 @@ html_hosts_main(const char *qs)
    else
       str_append(buf, " | " NEXT);
 
-   str_append(buf, "<br/>\n");
+   str_append(buf, "<br>\n");
 
    html_close(buf);
 done:
@@ -1036,7 +1036,7 @@ html_hosts_detail(const char *ip)
       str_appendf(buf, "(canonically <b>%s</b>)\n", canonical);
    str_appendf(buf,
       "<p>\n"
-       "<b>Hostname:</b> %s<br/>\n",
+       "<b>Hostname:</b> %s<br>\n",
       (h->u.host.dns == NULL)?"(resolving...)":h->u.host.dns);
 
    /* Resolve host "on demand" */
@@ -1046,7 +1046,7 @@ html_hosts_detail(const char *ip)
    if (show_mac_addrs)
       str_appendf(buf,
          "<b>MAC Address:</b> "
-         "<tt>%x:%x:%x:%x:%x:%x</tt><br/>\n",
+         "<tt>%x:%x:%x:%x:%x:%x</tt><br>\n",
          h->u.host.mac_addr[0],
          h->u.host.mac_addr[1],
          h->u.host.mac_addr[2],
@@ -1077,9 +1077,9 @@ html_hosts_detail(const char *ip)
    str_appendf(buf,
       "</p>\n"
       "<p>\n"
-      " <b>In:</b> %'qu<br/>\n"
-      " <b>Out:</b> %'qu<br/>\n"
-      " <b>Total:</b> %'qu<br/>\n"
+      " <b>In:</b> %'qu<br>\n"
+      " <b>Out:</b> %'qu<br>\n"
+      " <b>Total:</b> %'qu<br>\n"
       "</p>\n",
       h->in, h->out, h->total);
 
diff --git a/html.c b/html.c
index bc3d341..18d434f 100644 (file)
--- a/html.c
+++ b/html.c
@@ -16,9 +16,9 @@
 void html_open(struct str *buf, const char *title, const char *interface,
     void (*header_callback)(struct str *buf))
 {
-    str_append(buf, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"
-        "  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"
-        "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
+    str_append(buf,
+        "<!DOCTYPE html>\n"
+        "<html>\n"
         "<head>\n");
     str_appendf(buf, "<title>%s (darkstat3 : %s)</title>\n"
         "<meta name=\"generator\" content=\"%s\" />\n", title, interface,