From 61cfcb15550bfa5b266cb238d0e34b18d810bad9 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Sun, 29 Nov 2015 13:21:49 +0800 Subject: [PATCH] Fix for head closing tag not reported (#327) --- src/parser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser.c b/src/parser.c index c942bd7..583b2ef 100644 --- a/src/parser.c +++ b/src/parser.c @@ -3759,6 +3759,10 @@ void TY_(ParseHead)(TidyDocImpl* doc, Node *head, GetTokenMode ARG_UNUSED(mode)) TY_(ReportError)(doc, head, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); } + + if (!head->closed) + TY_(ReportError)(doc, head, node, MISSING_ENDTAG_FOR); + #if !defined(NDEBUG) && defined(_MSC_VER) SPRTF("Exit ParseHead 1...\n"); #endif