diff options
author | corvid <devnull@localhost> | 2014-08-05 20:50:31 +0000 |
---|---|---|
committer | corvid <devnull@localhost> | 2014-08-05 20:50:31 +0000 |
commit | 8732524d776d61aaf5f71f9fe2ab7fb615060fa0 (patch) | |
tree | 0ea3d8e8e5fd0378abdd446bac3ee4dd5a4e7076 | |
parent | 744f32e29334a6de4d668a4ed1025be2a0407419 (diff) |
html5 doctype, whitespace permitted between "html" and '>'
...not only permitted, but seen sometimes. Why anyone would do that, I
don't know. Maybe to make certain browsers fail.
-rw-r--r-- | src/html.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html.cc b/src/html.cc index 036f1290..ff2eb0d1 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1571,7 +1571,6 @@ static int static void Html_parse_doctype(DilloHtml *html, const char *tag, int tagsize) { static const char HTML_SGML_sig [] = "<!DOCTYPE HTML PUBLIC "; - static const char HTML5_sig [] = "<!DOCTYPE html>"; static const char HTML20 [] = "-//IETF//DTD HTML"; static const char HTML32 [] = "-//W3C//DTD HTML 3.2"; static const char HTML40 [] = "-//W3C//DTD HTML 4.0"; @@ -1636,7 +1635,8 @@ static void Html_parse_doctype(DilloHtml *html, const char *tag, int tagsize) html->DocType = DT_HTML; html->DocTypeVersion = 2.0f; } - } else if (!dStrAsciiCasecmp(ntag, HTML5_sig)) { + } else if (!dStrAsciiCasecmp(ntag, "<!DOCTYPE html>") || + !dStrAsciiCasecmp(ntag, "<!DOCTYPE html >")) { html->DocType = DT_HTML; html->DocTypeVersion = 5.0f; } |