comparison src/protocols/yahoo/yahoo.c @ 10070:2b6bf836c6b9

[gaim-migrate @ 11046] This should fix Gideon N. Guillen's blank system message problem. I'm getting married tomorrow. Don't expect a lot of patches out of me. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 29 Sep 2004 15:01:33 +0000
parents c124bef68132
children e94f5975a4df
comparison
equal deleted inserted replaced
10069:7cbe12859d3a 10070:2b6bf836c6b9
911 } 911 }
912 912
913 static void yahoo_process_sysmessage(GaimConnection *gc, struct yahoo_packet *pkt) 913 static void yahoo_process_sysmessage(GaimConnection *gc, struct yahoo_packet *pkt)
914 { 914 {
915 GSList *l = pkt->hash; 915 GSList *l = pkt->hash;
916 char *prim, *me = NULL, *msg = NULL; 916 char *prim, *me = NULL, *msg = NULL, *escmsg = NULL;
917 917
918 while (l) { 918 while (l) {
919 struct yahoo_pair *pair = l->data; 919 struct yahoo_pair *pair = l->data;
920 920
921 if (pair->key == 5) 921 if (pair->key == 5)
924 msg = pair->value; 924 msg = pair->value;
925 925
926 l = l->next; 926 l = l->next;
927 } 927 }
928 928
929 if (!msg) 929 if (!msg || !g_utf8_validate(msg, -1, NULL))
930 return; 930 return;
931
932 escmsg = gaim_escape_html(msg);
931 933
932 prim = g_strdup_printf(_("Yahoo! system message for %s:"), 934 prim = g_strdup_printf(_("Yahoo! system message for %s:"),
933 me?me:gaim_connection_get_display_name(gc)); 935 me?me:gaim_connection_get_display_name(gc));
934 gaim_notify_info(NULL, NULL, prim, msg); 936 gaim_notify_info(NULL, NULL, prim, escmsg);
935 g_free(prim); 937 g_free(prim);
938 g_free(escmsg);
936 } 939 }
937 940
938 static void yahoo_buddy_added_us(GaimConnection *gc, struct yahoo_packet *pkt) { 941 static void yahoo_buddy_added_us(GaimConnection *gc, struct yahoo_packet *pkt) {
939 char *id = NULL; 942 char *id = NULL;
940 char *who = NULL; 943 char *who = NULL;