Mercurial > pidgin
comparison libpurple/protocols/oscar/oscar.c @ 31904:3322201b446f
I went through all our calls to purple_notify_user_info_add_pair() and
checked whether they should be purple_notify_user_info_add_pair_plaintext(),
instead. If it wasn't immediately obvious one way or the other then I
left a comment to investigate. I suspect there are still a lot of places
where we should use the _plaintext function to escape the value.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 22 Aug 2011 01:53:37 +0000 |
parents | a5b556ac1de5 |
children | 99ca503ea087 |
comparison
equal
deleted
inserted
replaced
31903:57d43a9a4e7e | 31904:3322201b446f |
---|---|
2276 } | 2276 } |
2277 | 2277 |
2278 return 0; | 2278 return 0; |
2279 } | 2279 } |
2280 | 2280 |
2281 static int purple_parse_clientauto_ch4(OscarData *od, char *who, guint16 reason, guint32 state, char *msg) { | 2281 static int purple_parse_clientauto_ch4(OscarData *od, const char *who, guint16 reason, guint32 state, char *msg) { |
2282 PurpleConnection *gc = od->gc; | 2282 PurpleConnection *gc = od->gc; |
2283 | 2283 |
2284 switch(reason) { | 2284 switch(reason) { |
2285 case 0x0003: { /* Reply from an ICQ status message request */ | 2285 case 0x0003: { /* Reply from an ICQ status message request */ |
2286 char *statusmsg, **splitmsg; | 2286 char *statusmsg, **splitmsg; |
2287 PurpleNotifyUserInfo *user_info; | 2287 PurpleNotifyUserInfo *user_info; |
2288 | 2288 |
2289 statusmsg = oscar_icqstatus(state); | |
2290 | |
2289 /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */ | 2291 /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */ |
2290 statusmsg = oscar_icqstatus(state); | 2292 /* TODO: Don't we need to escape each piece? */ |
2291 splitmsg = g_strsplit(msg, "\r\n", 0); | 2293 splitmsg = g_strsplit(msg, "\r\n", 0); |
2292 | 2294 |
2293 user_info = purple_notify_user_info_new(); | 2295 user_info = purple_notify_user_info_new(); |
2294 | 2296 |
2295 purple_notify_user_info_add_pair(user_info, _("UIN"), who); | 2297 purple_notify_user_info_add_pair_plaintext(user_info, _("UIN"), who); |
2298 /* TODO: Check whether it's correct to call add_pair_html, | |
2299 or if we should be using add_pair_plaintext */ | |
2296 purple_notify_user_info_add_pair(user_info, _("Status"), statusmsg); | 2300 purple_notify_user_info_add_pair(user_info, _("Status"), statusmsg); |
2297 purple_notify_user_info_add_section_break(user_info); | 2301 purple_notify_user_info_add_section_break(user_info); |
2298 purple_notify_user_info_add_pair(user_info, NULL, g_strjoinv("<BR>", splitmsg)); | 2302 purple_notify_user_info_add_pair(user_info, NULL, g_strjoinv("<BR>", splitmsg)); |
2299 | 2303 |
2300 g_free(statusmsg); | 2304 g_free(statusmsg); |
2307 | 2311 |
2308 case 0x0006: { /* Reply from an ICQ status message request */ | 2312 case 0x0006: { /* Reply from an ICQ status message request */ |
2309 char *statusmsg, **splitmsg; | 2313 char *statusmsg, **splitmsg; |
2310 PurpleNotifyUserInfo *user_info; | 2314 PurpleNotifyUserInfo *user_info; |
2311 | 2315 |
2316 statusmsg = oscar_icqstatus(state); | |
2317 | |
2312 /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */ | 2318 /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */ |
2313 statusmsg = oscar_icqstatus(state); | 2319 /* TODO: Don't we need to escape each piece? */ |
2314 splitmsg = g_strsplit(msg, "\r\n", 0); | 2320 splitmsg = g_strsplit(msg, "\r\n", 0); |
2315 | 2321 |
2316 user_info = purple_notify_user_info_new(); | 2322 user_info = purple_notify_user_info_new(); |
2317 | 2323 |
2318 purple_notify_user_info_add_pair(user_info, _("UIN"), who); | 2324 purple_notify_user_info_add_pair_plaintext(user_info, _("UIN"), who); |
2325 /* TODO: Check whether it's correct to call add_pair_html, | |
2326 or if we should be using add_pair_plaintext */ | |
2319 purple_notify_user_info_add_pair(user_info, _("Status"), statusmsg); | 2327 purple_notify_user_info_add_pair(user_info, _("Status"), statusmsg); |
2320 purple_notify_user_info_add_section_break(user_info); | 2328 purple_notify_user_info_add_section_break(user_info); |
2321 purple_notify_user_info_add_pair(user_info, NULL, g_strjoinv("<BR>", splitmsg)); | 2329 purple_notify_user_info_add_pair(user_info, NULL, g_strjoinv("<BR>", splitmsg)); |
2322 | 2330 |
2323 g_free(statusmsg); | 2331 g_free(statusmsg); |