]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stats: use modern DOCTYPE tag
authorNicolas CARPi <nico-git@deltablot.email>
Tue, 20 Aug 2024 13:12:23 +0000 (15:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Aug 2024 13:55:31 +0000 (15:55 +0200)
Switching the stats page doctype to the modern standard is shorter and
less complex, and is the recommended doctype by current HTML standard.
It makes it clear that we do not want to run in quirks mode. More information below.

Quirks mode: https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode
HTML Standard: https://html.spec.whatwg.org/multipage/syntax.html#the-doctype

src/stats-html.c

index a8e63a2e2400f1d23ed6869848dd5af2cf61a563..c69fb9d2a7b6788fd16bba3d99b26dd1dabc3f35 100644 (file)
@@ -59,8 +59,7 @@ void stats_dump_html_head(struct appctx *appctx)
 
        /* WARNING! This must fit in the first buffer !!! */
        chunk_appendf(chk,
-                     "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n"
-                     "\"http://www.w3.org/TR/html4/loose.dtd\">\n"
+                     "<!DOCTYPE html>\n"
                      "<html><head><title>Statistics Report for " PRODUCT_NAME "%s%s</title>\n"
                      "<link rel=\"icon\" href=\"data:,\">\n"
                      "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\">\n"