[evolution-data-server] e_xml_get_node_text: Consider also CDATA section nodes, not only TEXT nodes
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] e_xml_get_node_text: Consider also CDATA section nodes, not only TEXT nodes
- Date: Mon, 29 Jun 2020 10:33:39 +0000 (UTC)
commit 0a09ef9b254c1eda5908847789b5373946a25fff
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 29 12:31:29 2020 +0200
e_xml_get_node_text: Consider also CDATA section nodes, not only TEXT nodes
When the server returns data in the CDATA section, then read it directly from
there, the same as it would a TEXT node.
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/223
src/libedataserver/e-xml-utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libedataserver/e-xml-utils.c b/src/libedataserver/e-xml-utils.c
index 6051b22d2..10bfcef99 100644
--- a/src/libedataserver/e-xml-utils.c
+++ b/src/libedataserver/e-xml-utils.c
@@ -674,11 +674,11 @@ e_xml_get_node_text (const xmlNode *node)
if (!node)
return NULL;
- if (node->type == XML_TEXT_NODE)
+ if (node->type == XML_TEXT_NODE || node->type == XML_CDATA_SECTION_NODE)
return node->content;
for (child = node->children; child; child = child->next) {
- if (child->type == XML_TEXT_NODE)
+ if (child->type == XML_TEXT_NODE || child->type == XML_CDATA_SECTION_NODE)
return child->content;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]