Merge pull request #832 from htacg/issue-815

Is #815 - Use case-insensitive test 'html'
This commit is contained in:
Geoff McLane 2020-09-28 20:27:20 +02:00 committed by GitHub
commit 4b2d5db743
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1828,7 +1828,11 @@ static uint FindGivenVersion( TidyDocImpl* doc, Node* doctype )
if (!fpi || !fpi->value) 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? */ return VERS_HTML5; /* TODO: do we need to check MORE? */
} }