changeset 31762:eaa0c30d58ca

Bj«Órn Voigt pointed out that my plugin info dialog doesn't show the e-mail addresses included in plugins' author strings. This should fix that. I opted to escape the plugin's name too because I recall seeing a plugin with characters in its displayed name that would need to be escaped to display in the dialog. Fixes <4E353E4E.3040707@chemnitz.dialup.cs.tu-berlin.de>.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sat, 06 Aug 2011 04:52:18 +0000
parents e1f1e7b927c3
children f33200f71cc3
files pidgin/gtkdialogs.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkdialogs.c	Sun Jul 31 10:35:47 2011 +0000
+++ b/pidgin/gtkdialogs.c	Sat Aug 06 04:52:18 2011 +0000
@@ -794,7 +794,8 @@
 	GList *l = NULL;
 	PurplePlugin *plugin = NULL;
 	char *title = g_strdup_printf(_("%s Plugin Information"), PIDGIN_NAME);
-	const char *pname, *pauthor, *pver, *pwebsite, *pid;
+	char *pname = NULL, *pauthor = NULL;
+	const char *pver, *pwebsite, *pid;
 	gboolean ploaded, punloadable;
 	static GtkWidget *plugins_info = NULL;
 
@@ -806,8 +807,8 @@
 	for(l = purple_plugins_get_all(); l; l = l->next) {
 		plugin = (PurplePlugin *)l->data;
 
-		pname = purple_plugin_get_name(plugin);
-		pauthor = purple_plugin_get_author(plugin);
+		pname = g_markup_escape_text(purple_plugin_get_name(plugin), -1);
+		pauthor = g_markup_escape_text(purple_plugin_get_author(plugin), -1);
 		pver = purple_plugin_get_version(plugin);
 		pwebsite = purple_plugin_get_homepage(plugin);
 		pid = purple_plugin_get_id(plugin);
@@ -829,6 +830,8 @@
 	g_signal_connect(G_OBJECT(plugins_info), "destroy",
 			G_CALLBACK(gtk_widget_destroyed), &plugins_info);
 	g_free(title);
+	g_free(pname);
+	g_free(pauthor);
 }
 
 static void