mirror of
https://github.com/labwc/labwc.git
synced 2025-11-08 13:30:00 -05:00
common/xml: parse CDATA as text
Before this patch, <![CDATA[xxx]]> was ignored in many cases.
For example, this didn't work:
<core>
<gap><![CDATA[10]]></gap>
</core>
This commit is contained in:
parent
5a50d87ee2
commit
00ed40454d
1 changed files with 2 additions and 1 deletions
|
|
@ -138,7 +138,8 @@ lab_xml_node_is_leaf(xmlNode *node)
|
|||
return false;
|
||||
}
|
||||
for (xmlNode *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 false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue