summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-02-02 10:59:39 +0000
committerRichard Hughes <richard@hughsie.com>2016-02-02 10:59:39 +0000
commit300d50119820e32f56a2c3d52d9704d835ba444d (patch)
treef28b80911fc819bc932cc4553a7c86de5426b9d6 /client
parenta29d45711b874398d69ac80af1e3938c77561db9 (diff)
downloadappstream-glib-300d50119820e32f56a2c3d52d9704d835ba444d.tar.gz
Escape data before writing to an HTML file
Fixes https://github.com/hughsie/appstream-glib/issues/84
Diffstat (limited to 'client')
-rw-r--r--client/as-util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/as-util.c b/client/as-util.c
index b28f764..888606e 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -1565,10 +1565,12 @@ as_util_status_html_join (GPtrArray *array)
txt = g_string_new ("");
for (i = 0; i < array->len; i++) {
+ g_autofree gchar *escaped = NULL;
tmp = g_ptr_array_index (array, i);
if (txt->len > 0)
g_string_append (txt, ", ");
- g_string_append (txt, tmp);
+ escaped = g_markup_escape_text (tmp, -1);
+ g_string_append (txt, escaped);
}
return g_string_free (txt, FALSE);
}