Is #729 - Show 'warnings' in all cases
This commit is contained in:
parent
86b52dc108
commit
817ef6446c
|
@ -1863,7 +1863,8 @@ void TY_(CheckHTMLTagsAttribsVersions)( TidyDocImpl* doc, Node* node )
|
||||||
next_attr = attval->next;
|
next_attr = attval->next;
|
||||||
|
|
||||||
attrIsProprietary = TY_(AttributeIsProprietary)(node, attval);
|
attrIsProprietary = TY_(AttributeIsProprietary)(node, attval);
|
||||||
attrIsMismatched = check_versions ? TY_(AttributeIsMismatched)(node, attval, doc) : no;
|
/* Is. #729 - always check version match if HTML5 */
|
||||||
|
attrIsMismatched = (check_versions | htmlIs5) ? TY_(AttributeIsMismatched)(node, attval, doc) : no;
|
||||||
/* Let the PROPRIETARY_ATTRIBUTE warning have precedence. */
|
/* Let the PROPRIETARY_ATTRIBUTE warning have precedence. */
|
||||||
if ( attrIsProprietary )
|
if ( attrIsProprietary )
|
||||||
{
|
{
|
||||||
|
@ -1872,7 +1873,15 @@ void TY_(CheckHTMLTagsAttribsVersions)( TidyDocImpl* doc, Node* node )
|
||||||
}
|
}
|
||||||
else if ( attrIsMismatched )
|
else if ( attrIsMismatched )
|
||||||
{
|
{
|
||||||
TY_(ReportAttrError)(doc, node, attval, attrReportType);
|
if (htmlIs5)
|
||||||
|
{
|
||||||
|
/* Is. #729 - In html5 TidyStrictTagsAttr controls error or warn */
|
||||||
|
TY_(ReportAttrError)(doc, node, attval,
|
||||||
|
check_versions ? MISMATCHED_ATTRIBUTE_ERROR : MISMATCHED_ATTRIBUTE_WARN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
TY_(ReportAttrError)(doc, node, attval, attrReportType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @todo: do we need a new option to drop mismatches? Or should we
|
/* @todo: do we need a new option to drop mismatches? Or should we
|
||||||
|
|
Loading…
Reference in a new issue