• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From a17a1f564eaac42d6db561c639b5d2461884e829 Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Wed, 18 May 2022 02:17:31 +0200
4Subject: [PATCH] Don't reset nsDef when changing node content
5
6nsDef is only used for element nodes.
7
8Reference:https://github.com/GNOME/libxml2/commit/a17a1f564eaac42d6db561c639b5d2461884e829
9Conflict:NA
10
11---
12 tree.c | 3 ---
13 1 file changed, 3 deletions(-)
14
15diff --git a/tree.c b/tree.c
16index fe6f54a..84da156 100644
17--- a/tree.c
18+++ b/tree.c
19@@ -5721,7 +5721,6 @@ xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) {
20 	    } else
21 		cur->content = NULL;
22 	    cur->properties = NULL;
23-	    cur->nsDef = NULL;
24 	    break;
25         case XML_DOCUMENT_NODE:
26         case XML_HTML_DOCUMENT_NODE:
27@@ -5799,7 +5798,6 @@ xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) {
28 	    } else
29 		cur->content = NULL;
30 	    cur->properties = NULL;
31-	    cur->nsDef = NULL;
32 	    break;
33         case XML_DOCUMENT_NODE:
34         case XML_DTD_NODE:
35@@ -5878,7 +5876,6 @@ xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len) {
36 			    xmlDictOwns(cur->doc->dict, cur->content))) {
37 		    cur->content = xmlStrncatNew(cur->content, content, len);
38 		    cur->properties = NULL;
39-		    cur->nsDef = NULL;
40 		} else {
41 		    cur->content = xmlStrncat(cur->content, content, len);
42                 }
43--
442.27.0
45
46