From 6f9dc2327ed2c61bd375e7815efe855b6bcf33bb Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Sun, 1 Feb 2015 18:46:31 +0800 Subject: [PATCH] Fix for #103 - don't drop empty dd tags. --- src/parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parser.c b/src/parser.c index ca8e51d..8cca87c 100644 --- a/src/parser.c +++ b/src/parser.c @@ -317,6 +317,11 @@ static Bool CanPrune( TidyDocImpl* doc, Node *element ) if ( nodeIsOPTION(element) && element->attributes != NULL ) return no; + /* fix for #103 - don't drop empty dd tags lest document not validate */ + if (nodeIsDD(element)) + return no; + + return yes; }