summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Smith <bmsmith@src.gnome.org>2006-07-01 14:24:02 +0000
committerBrent Smith <bmsmith@src.gnome.org>2006-07-01 14:24:02 +0000
commita0ccc0570257e327da15db9a0c907866ef56f69a (patch)
tree4e160f50be3a9944a9aeb595f4877a4eed1f3f5a
parent34040150ee0d8d8626aeabd1e983a08c65ef3224 (diff)
downloadyelp-YELP_DOCUMENT_BRANCHPOINT.tar.gz
Fix to properly escape ampersand characters by using xmlNewTextChild,YELP_DOCUMENT_BRANCHPOINT
* src/yelp-toc-pager.c: (process_info_pending): Fix to properly escape ampersand characters by using xmlNewTextChild, patch from Daniel Drake. Fixes #343372
-rw-r--r--ChangeLog6
-rw-r--r--src/yelp-toc-pager.c13
2 files changed, 9 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 25a94abe..2c298ce9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-01 Brent Smith <gnome@nextreality.net>
+
+ * src/yelp-toc-pager.c: (process_info_pending): Fix to properly escape
+ ampersand characters by using xmlNewTextChild, patch from Daniel
+ Drake. Fixes #343372
+
2006-06-30 Brent Smith <gnome@nextreality.net>
* src/yelp-debug.c: (yelp_debug): Print DB_PROFILE message to the
diff --git a/src/yelp-toc-pager.c b/src/yelp-toc-pager.c
index 53af95ce..5980e0dc 100644
--- a/src/yelp-toc-pager.c
+++ b/src/yelp-toc-pager.c
@@ -1535,13 +1535,6 @@ 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;", amp);
- g_strfreev (amp);
files = g_strsplit (str, "\n", -1);
@@ -1610,12 +1603,12 @@ process_info_pending (YelpTocPager *pager)
NULL);
xmlNewNsProp (tmp, NULL, BAD_CAST "href", BAD_CAST fname);
- xmlNewChild (tmp, NULL, BAD_CAST "title",
+ xmlNewTextChild (tmp, NULL, BAD_CAST "title",
BAD_CAST part2);
- xmlNewChild (tmp, NULL, BAD_CAST "tooltip",
+ xmlNewTextChild (tmp, NULL, BAD_CAST "tooltip",
BAD_CAST tooltip);
- xmlNewChild (tmp, NULL, BAD_CAST "description",
+ xmlNewTextChild (tmp, NULL, BAD_CAST "description",
BAD_CAST desc);
}
done: