From fd1fd8a388b980cceacf2d032e8ac6a4a16ff5e1 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sun, 28 Apr 2019 20:52:48 +0200 Subject: [PATCH] Is #815 - Use case-insensitive test 'html' --- src/lexer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lexer.c b/src/lexer.c index ca66aee..fc2a4e3 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -1828,7 +1828,11 @@ static uint FindGivenVersion( TidyDocImpl* doc, Node* doctype ) if (!fpi || !fpi->value) { - if (doctype->element && (TY_(tmbstrcmp)(doctype->element,"html") == 0)) + /*\ + * Is. #815 - change to case-insensitive test + * See REC: https://www.w3.org/TR/html5/syntax.html#the-doctype + \*/ + if (doctype->element && (TY_(tmbstrcasecmp)(doctype->element,"html") == 0)) { return VERS_HTML5; /* TODO: do we need to check MORE? */ }