diff options
Diffstat (limited to 'ext/dom/characterdata.c')
| -rw-r--r-- | ext/dom/characterdata.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index 1fa1501e3..2a75bacdf 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: characterdata.c,v 1.15.2.1 2006/01/01 12:50:06 sniper Exp $ */ +/* $Id: characterdata.c,v 1.15.2.1.2.1 2006/09/16 13:54:52 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -207,9 +207,19 @@ PHP_FUNCTION(dom_characterdata_append_data) } DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); - +#if LIBXML_VERSION < 20627 +/* Implement logic from libxml xmlTextConcat to add suport for comments and PI */ + if ((nodep->content == (xmlChar *) &(nodep->properties)) || + ((nodep->doc != NULL) && (nodep->doc->dict != NULL) && + xmlDictOwns(nodep->doc->dict, nodep->content))) { + nodep->content = xmlStrncatNew(nodep->content, arg, arg_len); + } else { + nodep->content = xmlStrncat(nodep->content, arg, arg_len); + } + nodep->properties = NULL; +#else xmlTextConcat(nodep, arg, arg_len); - +#endif RETURN_TRUE; } /* }}} end dom_characterdata_append_data */ |
