mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
xmlTextConcat works with comments and PI nodes (bug #355962). fix
* tree.c: xmlTextConcat works with comments and PI nodes (bug #355962). * parser.c: fix resulting tree corruption when using XML namespace with existing doc in xmlParseBalancedChunkMemoryRecover.
This commit is contained in:
4
parser.c
4
parser.c
@@ -11903,6 +11903,9 @@ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax,
|
||||
} else {
|
||||
ctxt->myDoc = newDoc;
|
||||
newDoc->children->doc = doc;
|
||||
/* Ensure that doc has XML spec namespace */
|
||||
xmlSearchNsByHref(doc, (xmlNodePtr)doc, XML_XML_NAMESPACE);
|
||||
newDoc->oldNs = doc->oldNs;
|
||||
}
|
||||
ctxt->instate = XML_PARSER_CONTENT;
|
||||
ctxt->depth = depth;
|
||||
@@ -11963,6 +11966,7 @@ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax,
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
newDoc->intSubset = NULL;
|
||||
newDoc->extSubset = NULL;
|
||||
newDoc->oldNs = NULL;
|
||||
xmlFreeDoc(newDoc);
|
||||
|
||||
return(ret);
|
||||
|
Reference in New Issue
Block a user