cedric pushed a commit to branch master.

commit 8cac00fc6624e6ba703b25ad316ce45503dfa79d
Author: Vladislav Brovko <[email protected]>
Date:   Mon Mar 11 11:02:33 2013 +0900

    eina: prevent space stripping of CDATA in Eina_Simple_XML.
    
    Prevent stripping spaces (after [CDATA[ and before ]]>) in XML like:
    <![CDATA[ <foo>bar</foo> ]]>
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/lib/eina/eina_simple_xml_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_simple_xml_parser.c 
b/src/lib/eina/eina_simple_xml_parser.c
index 5becc27..2ead2e2 100644
--- a/src/lib/eina/eina_simple_xml_parser.c
+++ b/src/lib/eina/eina_simple_xml_parser.c
@@ -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);

-- 

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev

Reply via email to