changeset 29888:fddded5ee514

Escape buddy notes when adding them to the tooltip so notes can't totally screw up the tooltip
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 26 Feb 2010 14:14:43 +0000
parents 1c6c2f5ecf53
children 0d3151a41134
files pidgin/plugins/gtkbuddynote.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/gtkbuddynote.c	Thu Feb 25 22:47:28 2010 +0000
+++ b/pidgin/plugins/gtkbuddynote.c	Fri Feb 26 14:14:43 2010 +0000
@@ -31,11 +31,13 @@
 		const gchar *note = purple_blist_node_get_string(node, "notes");
 
 		if ((note != NULL) && (*note != '\0')) {
-			char *tmp;
+			char *tmp, *esc;
 			purple_markup_html_to_xhtml(note, NULL, &tmp);
+			esc = g_markup_escape_text(tmp, -1);
+			g_free(tmp);
 			g_string_append_printf(text, _("\n<b>Buddy Note</b>: %s"),
-			                       tmp);
-			g_free(tmp);
+			                       esc);
+			g_free(esc);
 		}
 	}
 }