Issue #456 - BAH! Fix a stupid logic reversal
This commit is contained in:
parent
e28ec72301
commit
13b34c9d8b
|
@ -2210,6 +2210,7 @@ void FixBrakes( TidyDocImpl* pDoc, Node *pParent )
|
||||||
|
|
||||||
/* Issue #456 - This is discarded
|
/* Issue #456 - This is discarded
|
||||||
See replacement TidyMetaCharset */
|
See replacement TidyMetaCharset */
|
||||||
|
#if 0 /* 000000000000000000000000 */
|
||||||
void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
|
void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
|
||||||
{
|
{
|
||||||
Node *pNode;
|
Node *pNode;
|
||||||
|
@ -2285,6 +2286,7 @@ void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
|
||||||
pLastProp = NULL;
|
pLastProp = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* 000000000000000000000000 */
|
||||||
|
|
||||||
/*\
|
/*\
|
||||||
* Issue #456 - Check meta charset
|
* Issue #456 - Check meta charset
|
||||||
|
@ -2324,10 +2326,12 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc)
|
||||||
if (cfgAutoBool(doc, TidyBodyOnly) == TidyYesState)
|
if (cfgAutoBool(doc, TidyBodyOnly) == TidyYesState)
|
||||||
return no; /* nothing to do here if showing body only */
|
return no; /* nothing to do here if showing body only */
|
||||||
|
|
||||||
|
#if 0 /* 000000000000000000000000 */
|
||||||
if (!add_meta) {
|
if (!add_meta) {
|
||||||
TY_(VerifyHTTPEquiv)(doc, head);
|
TY_(VerifyHTTPEquiv)(doc, head);
|
||||||
return no;
|
return no;
|
||||||
}
|
}
|
||||||
|
#endif /* 000000000000000000000000 */
|
||||||
|
|
||||||
tidyBufInit(&charsetString);
|
tidyBufInit(&charsetString);
|
||||||
/* Set up the content test 'charset=value' */
|
/* Set up the content test 'charset=value' */
|
||||||
|
@ -2419,7 +2423,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc)
|
||||||
in void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
|
in void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
|
||||||
lcontent = TY_(tmbstrtolower)(contentAttr->value);
|
lcontent = TY_(tmbstrtolower)(contentAttr->value);
|
||||||
*/
|
*/
|
||||||
if (TY_(tmbstrcasecmp)(contentAttr->value, charsetString.bp))
|
if (TY_(tmbstrcasecmp)(contentAttr->value, charsetString.bp) == 0)
|
||||||
{
|
{
|
||||||
/* we already found one, so remove the rest. */
|
/* we already found one, so remove the rest. */
|
||||||
if (charsetFound)
|
if (charsetFound)
|
||||||
|
@ -2470,7 +2474,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* completed head scan - add appropriate meta - if 'yes' and none exists */
|
/* completed head scan - add appropriate meta - if 'yes' and none exists */
|
||||||
if (cfgBool(doc, TidyMetaCharset) && !charsetFound)
|
if (add_meta && !charsetFound)
|
||||||
{
|
{
|
||||||
/* add appropriate meta charset tag - no warning */
|
/* add appropriate meta charset tag - no warning */
|
||||||
metaTag = TY_(InferredTag)(doc, TidyTag_META);
|
metaTag = TY_(InferredTag)(doc, TidyTag_META);
|
||||||
|
|
Loading…
Reference in a new issue