From 885e85d0a24689968e3dafe36ea0df0e294caa2a Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Mon, 30 Nov 2015 17:55:50 +0100 Subject: [PATCH] Issue #308 - remove bad warn, bad assert, and free discarded --- src/parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parser.c b/src/parser.c index 583b2ef..19ecf54 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1587,10 +1587,11 @@ void TY_(ParseNamespace)(TidyDocImpl* doc, Node *basenode, GetTokenMode mode) else { /* unmatched close tag: report an error and discard */ - TY_(ReportError)(doc, parent, node, NON_MATCHING_ENDTAG); + /* TY_(ReportError)(doc, parent, node, NON_MATCHING_ENDTAG); Issue #308 - Seems wrong warning! */ TY_(ReportError)(doc, parent, node, DISCARDING_UNEXPECTED); assert(parent); - assert(parent->tag != node->tag); + /* assert(parent->tag != node->tag); Issue #308 - Seems would always be true! */ + TY_(FreeNode)( doc, node); /* Issue #308 - Discard unexpected end tag memory */ } } else if (node->type == StartTag)