eina: prevent space stripping of CDATA in Eina_Simple_XML.
authorVladislav Brovko <v.brovko@samsung.com>
Mon, 11 Mar 2013 02:02:33 +0000 (11:02 +0900)
committerCedric BAIL <cedric.bail@samsung.com>
Mon, 11 Mar 2013 02:03:05 +0000 (11:03 +0900)
Prevent stripping spaces (after [CDATA[ and before ]]>) in XML like:
<![CDATA[ <foo>bar</foo> ]]>

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
src/lib/eina/eina_simple_xml_parser.c

index 5becc27..2ead2e2 100644 (file)
@@ -413,7 +413,7 @@ eina_simple_xml_parse(const char *buf, unsigned buflen, Eina_Bool strip, Eina_Si
                              break;
                          }
 
-                       if ((strip) && (type != EINA_SIMPLE_XML_ERROR))
+                       if ((strip) && (type != EINA_SIMPLE_XML_ERROR) && (type != EINA_SIMPLE_XML_CDATA))
                          {
                             start = _eina_simple_xml_whitespace_skip
                               (start, end);