diff options
author | Andreas Krennmair <ak@synflood.at> | 2009-03-23 18:47:55 +0100 |
---|---|---|
committer | Andreas Krennmair <ak@synflood.at> | 2009-03-23 18:47:55 +0100 |
commit | 3426bdda94bbcc2a07db0dbb4e2766fa387d711e (patch) | |
tree | f4f0318fd740a8bc74ac46545094eed937ea10fa | |
parent | 132e8cc350fa58ea3eb3bd4346f28ac71d39554c (diff) |
improved Atom parser.
-rw-r--r-- | rss/atom_parser.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/rss/atom_parser.cpp b/rss/atom_parser.cpp index e233b5e1..f4950254 100644 --- a/rss/atom_parser.cpp +++ b/rss/atom_parser.cpp @@ -63,9 +63,9 @@ item atom_parser::parse_entry(xmlNode * entryNode) { it.title_type = "text"; } else if (node_is(node, "content")) { std::string mode = get_prop(node, "mode"); - if (mode == "xml") { + if (mode == "xml" || mode == "") { it.description = get_xml_content(node); - } else if (mode == "escaped" || mode == "") { + } else if (mode == "escaped") { it.description = get_content(node); } it.description_type = get_prop(node, "type"); @@ -85,7 +85,12 @@ item atom_parser::parse_entry(xmlNode * entryNode) { it.enclosure_type = get_prop(node, "type"); } } else if (node_is(node, "summary")) { - summary = get_content(node); + std::string mode = get_prop(node, "mode"); + if (mode == "xml" || mode == "") { + summary = get_xml_content(node); + } else if (mode == "escaped") { + summary = get_content(node); + } summary_type = get_prop(node, "type"); if (summary_type == "") summary_type = "text"; |