Skip to content

Commit 13b34c9

Browse files
committed
Issue #456 - BAH! Fix a stupid logic reversal
1 parent e28ec72 commit 13b34c9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/clean.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -2210,6 +2210,7 @@ void FixBrakes( TidyDocImpl* pDoc, Node *pParent )
22102210

22112211
/* Issue #456 - This is discarded
22122212
See replacement TidyMetaCharset */
2213+
#if 0 /* 000000000000000000000000 */
22132214
void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
22142215
{
22152216
Node *pNode;
@@ -2285,6 +2286,7 @@ void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
22852286
pLastProp = NULL;
22862287
}
22872288
}
2289+
#endif /* 000000000000000000000000 */
22882290

22892291
/*\
22902292
* Issue #456 - Check meta charset
@@ -2324,10 +2326,12 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc)
23242326
if (cfgAutoBool(doc, TidyBodyOnly) == TidyYesState)
23252327
return no; /* nothing to do here if showing body only */
23262328

2329+
#if 0 /* 000000000000000000000000 */
23272330
if (!add_meta) {
23282331
TY_(VerifyHTTPEquiv)(doc, head);
23292332
return no;
23302333
}
2334+
#endif /* 000000000000000000000000 */
23312335

23322336
tidyBufInit(&charsetString);
23332337
/* Set up the content test 'charset=value' */
@@ -2419,7 +2423,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc)
24192423
in void TY_(VerifyHTTPEquiv)(TidyDocImpl* doc, Node *head)
24202424
lcontent = TY_(tmbstrtolower)(contentAttr->value);
24212425
*/
2422-
if (TY_(tmbstrcasecmp)(contentAttr->value, charsetString.bp))
2426+
if (TY_(tmbstrcasecmp)(contentAttr->value, charsetString.bp) == 0)
24232427
{
24242428
/* we already found one, so remove the rest. */
24252429
if (charsetFound)
@@ -2470,7 +2474,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc)
24702474
}
24712475

24722476
/* completed head scan - add appropriate meta - if 'yes' and none exists */
2473-
if (cfgBool(doc, TidyMetaCharset) && !charsetFound)
2477+
if (add_meta && !charsetFound)
24742478
{
24752479
/* add appropriate meta charset tag - no warning */
24762480
metaTag = TY_(InferredTag)(doc, TidyTag_META);

0 commit comments

Comments
 (0)