aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-07-03 17:28:26 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-07-03 17:28:26 +0800
commitea3b220f0497a14ec15408dfdfab7d5d693974b8 (patch)
tree5499b731fd254061cdc84c109baf779551c1d4d9
parent2e66b77dfc980f674080db4f58922ceb616d228b (diff)
downloadgsoc2013-evolution-ea3b220f0497a14ec15408dfdfab7d5d693974b8.tar.gz
gsoc2013-evolution-ea3b220f0497a14ec15408dfdfab7d5d693974b8.tar.zst
gsoc2013-evolution-ea3b220f0497a14ec15408dfdfab7d5d693974b8.zip
** Fix for bug #243201
2008-07-03 Milan Crha <mcrha@redhat.com> ** Fix for bug #243201 * filter-rule.c: (xml_encode): Escape rule title so that can contain also XML entities in the file. svn path=/trunk/; revision=35716
-rw-r--r--filter/ChangeLog7
-rw-r--r--filter/filter-rule.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index 1c4e3cd3b3..1e713d561e 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-03 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #243201
+
+ * filter-rule.c: (xml_encode): Escape rule title so that can contain
+ also XML entities in the file.
+
2008-06-16 Maciej Piechotka <uzytkownik2@gmal.com>
** Fix for bug #526262
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
index 6e92de9aba..e6e59baeac 100644
--- a/filter/filter-rule.c
+++ b/filter/filter-rule.c
@@ -321,9 +321,13 @@ xml_encode (FilterRule *fr)
}
if (fr->name) {
+ char *escaped = g_markup_escape_text (fr->name, -1);
+
work = xmlNewNode (NULL, (const unsigned char *)"title");
- xmlNodeSetContent (work, (unsigned char *)fr->name);
+ xmlNodeSetContent (work, (unsigned char *)escaped);
xmlAddChild (node, work);
+
+ g_free (escaped);
}
set = xmlNewNode (NULL, (const unsigned char *)"partset");