applied documentation patches from Markus Keim fixed one bug and added a
* tree.c: applied documentation patches from Markus Keim
* xmlregexp.c: fixed one bug and added a couple of optimisations
while working on bug #362989
Daniel
diff --git a/tree.c b/tree.c
index d5b9fec..ffbcabd 100644
--- a/tree.c
+++ b/tree.c
@@ -5199,6 +5199,9 @@
* @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) {
@@ -5273,6 +5276,9 @@
* @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) {
@@ -5344,6 +5350,9 @@
* @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) {
@@ -5416,6 +5425,9 @@
* @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) {