Issue #338 - Deal with two other spurious access warnings
This commit is contained in:
parent
8b2f92f625
commit
d142527a8e
16
src/access.c
16
src/access.c
|
@ -2761,6 +2761,10 @@ static Bool CheckMetaData( TidyDocImpl* doc, Node* node, Bool HasMetaData )
|
|||
TY_(ReportAccessError)( doc, node, REMOVE_AUTO_REDIRECT);
|
||||
}
|
||||
}
|
||||
if (TY_(IsHTML5Mode)(doc) && attrIsCHARSET(av) && hasValue(av))
|
||||
{
|
||||
ContainsAttr = yes;
|
||||
}
|
||||
}
|
||||
|
||||
if ( HasContent || HasHttpEquiv )
|
||||
|
@ -2840,10 +2844,18 @@ static void CheckDocType( TidyDocImpl* doc )
|
|||
if (DTnode && DTnode->end != 0)
|
||||
{
|
||||
ctmbstr word = textFromOneNode( doc, DTnode);
|
||||
if ((strstr (word, "HTML PUBLIC") == NULL) &&
|
||||
(strstr (word, "html PUBLIC") == NULL))
|
||||
if (TY_(IsHTML5Mode)(doc))
|
||||
{
|
||||
if ((strstr(word, "HTML") == NULL) &&
|
||||
(strstr(word, "html") == NULL))
|
||||
DTnode = NULL;
|
||||
}
|
||||
else {
|
||||
if ((strstr(word, "HTML PUBLIC") == NULL) &&
|
||||
(strstr(word, "html PUBLIC") == NULL))
|
||||
DTnode = NULL;
|
||||
}
|
||||
}
|
||||
if (!DTnode)
|
||||
TY_(ReportAccessError)( doc, &doc->root, DOCTYPE_MISSING);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue