Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/bonjour.c Sun Aug 21 21:27:17 2011 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Mon Aug 22 01:53:37 2011 +0000 @@ -371,9 +371,12 @@ else status_description = purple_status_get_name(status); - purple_notify_user_info_add_pair(user_info, _("Status"), status_description); - if (message != NULL) + purple_notify_user_info_add_pair_plaintext(user_info, _("Status"), status_description); + if (message != NULL) { + /* TODO: Check whether it's correct to call add_pair_html, + or if we should be using add_pair_plaintext */ purple_notify_user_info_add_pair(user_info, _("Message"), message); + } if (bb == NULL) { purple_debug_error("bonjour", "Got tooltip request for a buddy without protocol data.\n"); @@ -382,20 +385,35 @@ /* Only show first/last name if there is a nickname set (to avoid duplication) */ if (bb->nick != NULL && *bb->nick != '\0') { - if (bb->first != NULL && *bb->first != '\0') + if (bb->first != NULL && *bb->first != '\0') { + /* TODO: Check whether it's correct to call add_pair_html, + or if we should be using add_pair_plaintext */ purple_notify_user_info_add_pair(user_info, _("First name"), bb->first); - if (bb->last != NULL && *bb->last != '\0') + } + if (bb->last != NULL && *bb->last != '\0') { + /* TODO: Check whether it's correct to call add_pair_html, + or if we should be using add_pair_plaintext */ purple_notify_user_info_add_pair(user_info, _("Last name"), bb->last); + } } - if (bb->email != NULL && *bb->email != '\0') + if (bb->email != NULL && *bb->email != '\0') { + /* TODO: Check whether it's correct to call add_pair_html, + or if we should be using add_pair_plaintext */ purple_notify_user_info_add_pair(user_info, _("Email"), bb->email); + } - if (bb->AIM != NULL && *bb->AIM != '\0') + if (bb->AIM != NULL && *bb->AIM != '\0') { + /* TODO: Check whether it's correct to call add_pair_html, + or if we should be using add_pair_plaintext */ purple_notify_user_info_add_pair(user_info, _("AIM Account"), bb->AIM); + } - if (bb->jid != NULL && *bb->jid != '\0') + if (bb->jid != NULL && *bb->jid != '\0') { + /* TODO: Check whether it's correct to call add_pair_html, + or if we should be using add_pair_plaintext */ purple_notify_user_info_add_pair(user_info, _("XMPP Account"), bb->jid); + } } static void