diff options
author | Don Scorgie <dscorgie@src.gnome.org> | 2006-05-30 17:52:14 +0000 |
---|---|---|
committer | Don Scorgie <dscorgie@src.gnome.org> | 2006-05-30 17:52:14 +0000 |
commit | 748bb2c2b6e607c808e462d8bd14004cc10a28e5 (patch) | |
tree | 359135784554ce4ece97ce12f215a6b751191c91 | |
parent | dbb9b0c1fb84e680e0954217f5bda4ae913c22b5 (diff) | |
download | yelp-748bb2c2b6e607c808e462d8bd14004cc10a28e5.tar.gz |
Escape & characters when encountered in info processing (fixes #343372)
* src/yelp-toc-pager.c:
Escape & characters when encountered in info processing (fixes #343372)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/yelp-toc-pager.c | 12 |
2 files changed, 15 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-05-30 Don Scorgie <dscorgie@cvs.gnome.org> + + * src/yelp-toc-pager.c: + Escape & characters when encountered in info processing (fixes #343372) + 2006-05-29 Brent Smith <gnome@nextreality.net> * src/yelp-toc-pager.c: (process_mandir_pending): diff --git a/src/yelp-toc-pager.c b/src/yelp-toc-pager.c index c9c91e42..6ecd71ce 100644 --- a/src/yelp-toc-pager.c +++ b/src/yelp-toc-pager.c @@ -1424,7 +1424,8 @@ process_info_pending (YelpTocPager *pager) xmlNodePtr tmp; xmlNodePtr new_node = NULL; gboolean menufound = FALSE; - + gchar ** amp; + if (!priv->toc_doc) { xmlXPathContextPtr xpath; xmlXPathObjectPtr obj; @@ -1444,7 +1445,14 @@ process_info_pending (YelpTocPager *pager) g_io_channel_read_to_end (channel, &str, &len, NULL); g_io_channel_shutdown (channel, FALSE, NULL); g_io_channel_unref (channel); - + /* Check the string for the special character '&' which + * screws up the xml. If its there, it needs escaping + */ + amp = g_strsplit (str, "&", -1); + g_free (str); + str = g_strjoinv ("&", amp); + g_strfreev (amp); + files = g_strsplit (str, "\n", -1); for (ptr = files; *ptr != NULL; ptr++) { |