changeset 12702:ba7834d6e2c9

[gaim-migrate @ 15045] Escape plugin names, versions, and summaries to avoid Pango markup errors. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 03 Jan 2006 18:53:04 +0000
parents 0a4996f15509
children df49362e0378
files src/gtkplugin.c
diffstat 1 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkplugin.c	Tue Jan 03 18:20:20 2006 +0000
+++ b/src/gtkplugin.c	Tue Jan 03 18:53:04 2006 +0000
@@ -114,6 +114,9 @@
 		 probes != NULL;
 		 probes = probes->next)
 	{
+		char *name;
+		char *version;
+		char *summary;
 		char *desc;
 		plug = probes->data;
 
@@ -124,9 +127,18 @@
 		}
 
 		gtk_list_store_append (ls, &iter);
-		desc = g_strdup_printf("<b>%s</b> %s\n%s", plug->info->name ? _(plug->info->name) : g_basename(plug->path),
-				       plug->info->version,
-				       _(plug->info->summary));
+
+		name = g_markup_escape_text(plug->info->name ? _(plug->info->name) : g_basename(plug->path), -1);
+		version = g_markup_escape_text(plug->info->version, -1);
+		summary = g_markup_escape_text(_(plug->info->summary), -1);
+
+		desc = g_strdup_printf("<b>%s</b> %s\n%s", name,
+				       version,
+				       summary);
+		g_free(name);
+		g_free(version);
+		g_free(summary);
+
 		gtk_list_store_set(ls, &iter,
 				   0, gaim_plugin_is_loaded(plug),
 				   1, desc,