diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-08-31 20:03:19 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-08-31 20:03:19 +0000 |
commit | 9e1c72da8a36993419b59c5fc6339e995c481e00 (patch) | |
tree | 79516f9827fcea2ad3852c54e7be62b63a258392 /tree.c | |
parent | 0b2ae439f60d5617342d7a1b48a987f484899f93 (diff) | |
download | libxml2-9e1c72da8a36993419b59c5fc6339e995c481e00.tar.gz |
Armin Sander pointed a possible text coalescing problem, completed his
* tree.c: Armin Sander pointed a possible text coalescing
problem, completed his patch.
Daniel
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1968,7 +1968,8 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { xmlFreeNode(elem); return(cur); } - if ((cur->next != NULL) && (cur->type == XML_TEXT_NODE)) { + if ((cur->next != NULL) && (cur->next->type == XML_TEXT_NODE) && + (cur->name == cur->next->name)) { #ifndef XML_USE_BUFFER_CONTENT xmlChar *tmp; @@ -2047,7 +2048,8 @@ xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) { xmlFreeNode(elem); return(cur); } - if ((cur->prev != NULL) && (cur->prev->type == XML_TEXT_NODE)) { + if ((cur->prev != NULL) && (cur->prev->type == XML_TEXT_NODE) && + (cur->name == cur->prev->name)) { #ifndef XML_USE_BUFFER_CONTENT xmlNodeAddContent(cur->prev, elem->content); #else |