*** tree.c.orig 2006-11-01 10:29:52.931711300 +0100 --- tree.c 2006-11-01 10:33:00.168482900 +0100 *************** *** 5197,5206 **** --- 5197,5209 ---- * xmlNodeSetContent: * @cur: the node being modified * @content: the new value of the content * * Replace the content of a node. + * NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity + * references, but XML special chars need to be escaped first by using + * xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). */ void xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { if (cur == NULL) { #ifdef DEBUG_TREE *************** *** 5271,5280 **** --- 5274,5286 ---- * @cur: the node being modified * @content: the new value of the content * @len: the size of @content * * Replace the content of a node. + * NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity + * references, but XML special chars need to be escaped first by using + * xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). */ void xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) { if (cur == NULL) { #ifdef DEBUG_TREE *************** *** 5342,5351 **** --- 5348,5360 ---- * @cur: the node being modified * @content: extra content * @len: the size of @content * * Append the extra substring to the node content. + * NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be + * raw text, so unescaped XML special chars are allowed, entity + * references are not supported. */ void xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len) { if (cur == NULL) { #ifdef DEBUG_TREE *************** *** 5414,5423 **** --- 5423,5435 ---- * xmlNodeAddContent: * @cur: the node being modified * @content: extra content * * Append the extra substring to the node content. + * NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be + * raw text, so unescaped XML special chars are allowed, entity + * references are not supported. */ void xmlNodeAddContent(xmlNodePtr cur, const xmlChar *content) { int len;