From ea3b220f0497a14ec15408dfdfab7d5d693974b8 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 3 Jul 2008 09:28:26 +0000 Subject: ** Fix for bug #243201 2008-07-03 Milan Crha ** 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 --- filter/ChangeLog | 7 +++++++ filter/filter-rule.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'filter') 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 + + ** 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 ** 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"); -- cgit v1.2.3