aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2009-12-04 23:55:26 +0100
committerSebastian Pipping <sebastian@pipping.org>2009-12-05 00:17:20 +0100
commit9c9f1661c23c96e97079eefa81f667cde38208f1 (patch)
tree93182164bf6a48c102bb46bab5b147cf1698aaad
parentIntroduce .gitignore (diff)
downloadlayman-9c9f1661c23c96e97079eefa81f667cde38208f1.tar.gz
layman-9c9f1661c23c96e97079eefa81f667cde38208f1.tar.bz2
layman-9c9f1661c23c96e97079eefa81f667cde38208f1.zip
Fix reading of CDATA sections
-rw-r--r--layman/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/layman/utils.py b/layman/utils.py
index 178ad11..695b996 100644
--- a/layman/utils.py
+++ b/layman/utils.py
@@ -112,7 +112,9 @@ def node_to_dict(node):
for child in node.childNodes:
if child.nodeType == child.TEXT_NODE:
text = text + child.data
- if child.nodeType == child.ELEMENT_NODE:
+ elif child.nodeType == child.CDATA_SECTION_NODE:
+ text = text + child.data
+ elif child.nodeType == child.ELEMENT_NODE:
index = 1
while ('<' + child.tagName + '>' + str(index)) in result.keys():
index += 1