changeset 6173:1748679a5ee1

[gaim-migrate @ 6658] Fix the available message crash committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 17 Jul 2003 05:01:17 +0000
parents 44ced441eb02
children 8293762bdc27
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Thu Jul 17 04:54:21 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Jul 17 05:01:17 2003 +0000
@@ -5411,9 +5411,11 @@
 			}
 
 			if (bi->availablemsg && !(b->uc & UC_UNAVAILABLE)) {
+				gchar *escaped = g_markup_escape_text(bi->availablemsg, strlen(bi->availablemsg));
 				tmp = yay;
-				yay = g_strconcat(tmp, _("<b>Available:</b> "), bi->availablemsg, "\n", NULL);
+				yay = g_strconcat(tmp, _("<b>Available:</b> "), escaped, "\n", NULL);
 				free(tmp);
+				g_free(escaped);
 			}
 		}
 	} else {
@@ -5448,7 +5450,7 @@
 	} else if (GAIM_BUDDY_IS_ONLINE(b)) {
 		struct buddyinfo *bi = g_hash_table_lookup(od->buddyinfo, normalize(b->name));
 		if (bi->availablemsg)
-			ret = g_strdup(bi->availablemsg);
+			ret = g_markup_escape_text(bi->availablemsg, strlen(bi->availablemsg));
 	} else {
 		char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, b->name);
 		if (aim_ssi_waitingforauth(od->sess->ssi.local, gname, b->name))