aboutsummaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2014-08-05 20:50:31 +0000
committercorvid <devnull@localhost>2014-08-05 20:50:31 +0000
commit8732524d776d61aaf5f71f9fe2ab7fb615060fa0 (patch)
tree0ea3d8e8e5fd0378abdd446bac3ee4dd5a4e7076 /src/html.cc
parent744f32e29334a6de4d668a4ed1025be2a0407419 (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.
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc4
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;
}