- added xmlRemoveID() and xmlRemoveRef()
- added check and handling when possibly removing an ID
- fixed some entities problems
- added xmlParseTryOrFinish()
- changed the way struct aredeclared to allow gtk-doc to expose those
- closed #4960
- fixes to libs detection from Albert Chin-A-Young
- preparing 1.8.3 release
Daniel
diff --git a/tree.c b/tree.c
index bbeb90b..f21c76e 100644
--- a/tree.c
+++ b/tree.c
@@ -690,7 +690,7 @@
 
     while (node != NULL) {
         if (node->type == XML_TEXT_NODE) {
-	    if ((inLine) || (doc->type == XML_HTML_DOCUMENT_NODE)) {
+	    if (inLine) {
 #ifndef XML_USE_BUFFER_CONTENT
 		ret = xmlStrcat(ret, node->content);
 #else
@@ -941,6 +941,10 @@
         fprintf(stderr, "xmlFreeProp : property == NULL\n");
 	return;
     }
+    /* Check for ID removal -> leading to invalid references ! */
+    if ((cur->node != NULL) && 
+        (xmlIsID(cur->node->doc, cur->node, cur)))
+        xmlRemoveID(cur->node->doc, cur);
     if (cur->name != NULL) xmlFree((char *) cur->name);
     if (cur->val != NULL) xmlFreeNodeList(cur->val);
     memset(cur, -1, sizeof(xmlAttr));