diff --git a/src/parser.c b/src/parser.c index 30a9911..6ff2388 100644 --- a/src/parser.c +++ b/src/parser.c @@ -3019,9 +3019,22 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m while ((node = TY_(GetToken)(doc, IgnoreWhitespace)) != NULL) { - if (node->tag == table->tag && node->type == EndTag) + if (node->tag == table->tag ) { - TY_(FreeNode)( doc, node); + if (node->type == EndTag) + { + TY_(FreeNode)(doc, node); + } + else + { + /* Issue #498 - If a