diff options
Diffstat (limited to 'main/libxml2/whitespace-when-serializing-empty-html-documents.patch')
-rw-r--r-- | main/libxml2/whitespace-when-serializing-empty-html-documents.patch | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/main/libxml2/whitespace-when-serializing-empty-html-documents.patch b/main/libxml2/whitespace-when-serializing-empty-html-documents.patch deleted file mode 100644 index 81fc2434351..00000000000 --- a/main/libxml2/whitespace-when-serializing-empty-html-documents.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 92d9ab4c28842a09ca2b76d3ff2f933e01b6cd6f Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Mon, 7 Jun 2021 15:09:53 +0200 -Subject: [PATCH] Fix whitespace when serializing empty HTML documents - -The old, non-recursive HTML serialization code would always terminate -the output with a newline. The new implementation omitted the newline -if the document node had no children. Readd the newline when -serializing empty documents. - -Fixes #266. ---- - HTMLtree.c | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/HTMLtree.c b/HTMLtree.c -index bdd639c7..7a2b8558 100644 ---- a/HTMLtree.c -+++ b/HTMLtree.c -@@ -763,11 +763,15 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, - if (((xmlDocPtr) cur)->intSubset != NULL) { - htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL); - } -- /* Always validate cur->parent when descending. */ -- if ((cur->parent == parent) && (cur->children != NULL)) { -- parent = cur; -- cur = cur->children; -- continue; -+ if (cur->children != NULL) { -+ /* Always validate cur->parent when descending. */ -+ if (cur->parent == parent) { -+ parent = cur; -+ cur = cur->children; -+ continue; -+ } -+ } else { -+ xmlOutputBufferWriteString(buf, "\n"); - } - break; - --- -GitLab - |