HTML-Valid
view release on metacpan or search on metacpan
tidy-html5.c view on Meta::CPAN
charsetAttr->value = newValue;
}
/* Make sure it's the first element. */
if (currentNode != head->content->next) {
TY_(RemoveNode)(currentNode);
TY_(InsertNodeAtStart)(head, currentNode);
}
continue;
}
/*
2. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
expected for HTML4. This is normally ok - but can clash.
*/
if (httpEquivAttr && !charsetAttr)
{
contentAttr = TY_(AttrGetById)(currentNode, TidyAttr_CONTENT);
if (!contentAttr)
continue; /* has no 'content' attribute */
if (!httpEquivAttr->value)
{
prevNode = currentNode->prev;
TY_(Report)(doc, head, currentNode, DISCARDING_UNEXPECTED);
TY_(DiscardElement)(doc, currentNode);
currentNode = prevNode;
continue;
}
/* httpEquivAttrValue = TY_(tmbstrtolower)(httpEquivAttr->value); */
if (TY_(tmbstrcasecmp)(httpEquivAttr->value, (tmbstr) "content-type") != 0)
continue; /* is not 'content-type' */
if (!contentAttr->value)
{
continue; /* has no 'content' attribute has NO VALUE! */
}
/* check encoding matches
If a miss-match found here, fix it. previous silently done
in void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
lcontent = TY_(tmbstrtolower)(contentAttr->value);
*/
if (TY_(tmbstrcasecmp)(contentAttr->value, (ctmbstr)charsetString.bp) == 0)
( run in 1.490 second using v1.01-cache-2.11-cpan-d7f47b0818f )