Mercurial > pidgin
comparison libpurple/protocols/bonjour/bonjour.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 |
---|---|
369 else if (purple_presence_is_idle(presence)) | 369 else if (purple_presence_is_idle(presence)) |
370 status_description = _("Idle"); | 370 status_description = _("Idle"); |
371 else | 371 else |
372 status_description = purple_status_get_name(status); | 372 status_description = purple_status_get_name(status); |
373 | 373 |
374 purple_notify_user_info_add_pair(user_info, _("Status"), status_description); | 374 purple_notify_user_info_add_pair_plaintext(user_info, _("Status"), status_description); |
375 if (message != NULL) | 375 if (message != NULL) { |
376 /* TODO: Check whether it's correct to call add_pair_html, | |
377 or if we should be using add_pair_plaintext */ | |
376 purple_notify_user_info_add_pair(user_info, _("Message"), message); | 378 purple_notify_user_info_add_pair(user_info, _("Message"), message); |
379 } | |
377 | 380 |
378 if (bb == NULL) { | 381 if (bb == NULL) { |
379 purple_debug_error("bonjour", "Got tooltip request for a buddy without protocol data.\n"); | 382 purple_debug_error("bonjour", "Got tooltip request for a buddy without protocol data.\n"); |
380 return; | 383 return; |
381 } | 384 } |
382 | 385 |
383 /* Only show first/last name if there is a nickname set (to avoid duplication) */ | 386 /* Only show first/last name if there is a nickname set (to avoid duplication) */ |
384 if (bb->nick != NULL && *bb->nick != '\0') { | 387 if (bb->nick != NULL && *bb->nick != '\0') { |
385 if (bb->first != NULL && *bb->first != '\0') | 388 if (bb->first != NULL && *bb->first != '\0') { |
389 /* TODO: Check whether it's correct to call add_pair_html, | |
390 or if we should be using add_pair_plaintext */ | |
386 purple_notify_user_info_add_pair(user_info, _("First name"), bb->first); | 391 purple_notify_user_info_add_pair(user_info, _("First name"), bb->first); |
387 if (bb->last != NULL && *bb->last != '\0') | 392 } |
393 if (bb->last != NULL && *bb->last != '\0') { | |
394 /* TODO: Check whether it's correct to call add_pair_html, | |
395 or if we should be using add_pair_plaintext */ | |
388 purple_notify_user_info_add_pair(user_info, _("Last name"), bb->last); | 396 purple_notify_user_info_add_pair(user_info, _("Last name"), bb->last); |
389 } | 397 } |
390 | 398 } |
391 if (bb->email != NULL && *bb->email != '\0') | 399 |
400 if (bb->email != NULL && *bb->email != '\0') { | |
401 /* TODO: Check whether it's correct to call add_pair_html, | |
402 or if we should be using add_pair_plaintext */ | |
392 purple_notify_user_info_add_pair(user_info, _("Email"), bb->email); | 403 purple_notify_user_info_add_pair(user_info, _("Email"), bb->email); |
393 | 404 } |
394 if (bb->AIM != NULL && *bb->AIM != '\0') | 405 |
406 if (bb->AIM != NULL && *bb->AIM != '\0') { | |
407 /* TODO: Check whether it's correct to call add_pair_html, | |
408 or if we should be using add_pair_plaintext */ | |
395 purple_notify_user_info_add_pair(user_info, _("AIM Account"), bb->AIM); | 409 purple_notify_user_info_add_pair(user_info, _("AIM Account"), bb->AIM); |
396 | 410 } |
397 if (bb->jid != NULL && *bb->jid != '\0') | 411 |
412 if (bb->jid != NULL && *bb->jid != '\0') { | |
413 /* TODO: Check whether it's correct to call add_pair_html, | |
414 or if we should be using add_pair_plaintext */ | |
398 purple_notify_user_info_add_pair(user_info, _("XMPP Account"), bb->jid); | 415 purple_notify_user_info_add_pair(user_info, _("XMPP Account"), bb->jid); |
416 } | |
399 } | 417 } |
400 | 418 |
401 static void | 419 static void |
402 bonjour_do_group_change(PurpleBuddy *buddy, const char *new_group) { | 420 bonjour_do_group_change(PurpleBuddy *buddy, const char *new_group) { |
403 PurpleBlistNodeFlags oldflags; | 421 PurpleBlistNodeFlags oldflags; |