diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-03-27 04:28:54 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-03-27 04:28:54 +0800 |
commit | 4d4d2a9114f5c5dd1286a8388ffc51ee73629040 (patch) | |
tree | f35e7e4bfe4551a2ee8042b185340522f7498597 /filter/filter-file.c | |
parent | 7ecd4e666490ee384122b938149ac04ab8ead6d9 (diff) | |
download | gsoc2013-evolution-4d4d2a9114f5c5dd1286a8388ffc51ee73629040.tar gsoc2013-evolution-4d4d2a9114f5c5dd1286a8388ffc51ee73629040.tar.gz gsoc2013-evolution-4d4d2a9114f5c5dd1286a8388ffc51ee73629040.tar.bz2 gsoc2013-evolution-4d4d2a9114f5c5dd1286a8388ffc51ee73629040.tar.lz gsoc2013-evolution-4d4d2a9114f5c5dd1286a8388ffc51ee73629040.tar.xz gsoc2013-evolution-4d4d2a9114f5c5dd1286a8388ffc51ee73629040.tar.zst gsoc2013-evolution-4d4d2a9114f5c5dd1286a8388ffc51ee73629040.zip |
Loop over child nodes here too in order to not be affected by libxml2
2003-03-26 Jeffrey Stedfast <fejj@ximian.com>
* filter-file.c (xml_decode): Loop over child nodes here too in
order to not be affected by libxml2 crack.
* filter-source.c (xml_decode): Fixed to disreguard libxml2 crack.
(get_widget): Use strcmp instead of e_url_equal().
svn path=/trunk/; revision=20523
Diffstat (limited to 'filter/filter-file.c')
-rw-r--r-- | filter/filter-file.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/filter/filter-file.c b/filter/filter-file.c index 265f0855dd..7d33e025d9 100644 --- a/filter/filter-file.c +++ b/filter/filter-file.c @@ -257,16 +257,21 @@ xml_decode (FilterElement *fe, xmlNodePtr node) file->type = type; n = node->children; - if (!strcmp (n->name, type)) { - str = xmlNodeGetContent (n); - if (str) - file->path = g_strdup (str); - else - file->path = g_strdup (""); + while (n != NULL) { + if (!strcmp (n->name, type)) { + str = xmlNodeGetContent (n); + if (str) + file->path = g_strdup (str); + else + file->path = g_strdup (""); + + d(printf (" '%s'\n", file->path)); + break; + } else if (n->type == XML_ELEMENT_NODE) { + g_warning ("Unknown node type '%s' encountered decoding a %s\n", n->name, type); + } - d(printf (" '%s'\n", file->path)); - } else if (n->type == XML_ELEMENT_NODE) { - g_warning ("Unknown node type '%s' encountered decoding a %s\n", n->name, type); + n = n->next; } return 0; |