Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/jabber.c @ 27603:a12574d982a1
merge of '6bf1ed8cefd6bb5b980baf7501bcf6936634bd8d'
and 'aff31bc617044d2074a9f5dc1c1b838061c496fd'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 13 Jul 2009 05:40:12 +0000 |
parents | 6b1eb8dbf86e 7a2891487a00 |
children | 409ef6d76bf6 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Mon Jul 13 04:11:19 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Mon Jul 13 05:40:12 2009 +0000 @@ -1976,21 +1976,16 @@ } else { PurplePresence *presence = purple_buddy_get_presence(b); PurpleStatus *status = purple_presence_get_active_status(presence); - char *stripped; - - if(!(stripped = purple_markup_strip_html(purple_status_get_attr_string(status, "message")))) { - if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_TUNE)) { - PurpleStatus *status = purple_presence_get_status(presence, "tune"); - const char *title = purple_status_get_attr_string(status, PURPLE_TUNE_TITLE); - const char *artist = purple_status_get_attr_string(status, PURPLE_TUNE_ARTIST); - const char *album = purple_status_get_attr_string(status, PURPLE_TUNE_ALBUM); - stripped = purple_util_format_song_info(title, artist, album, NULL); - } - } - - if(stripped) { - ret = g_markup_escape_text(stripped, -1); - g_free(stripped); + const char *message; + + if((message = purple_status_get_attr_string(status, "message"))) { + ret = g_markup_escape_text(message, -1); + } else if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_TUNE)) { + PurpleStatus *status = purple_presence_get_status(presence, "tune"); + const char *title = purple_status_get_attr_string(status, PURPLE_TUNE_TITLE); + const char *artist = purple_status_get_attr_string(status, PURPLE_TUNE_ARTIST); + const char *album = purple_status_get_attr_string(status, PURPLE_TUNE_ALBUM); + ret = purple_util_format_song_info(title, artist, album, NULL); } } @@ -2007,12 +2002,7 @@ const char *state; if(jbr->status) { - char *tmp; - text = purple_strreplace(jbr->status, "\n", "<br />\n"); - tmp = purple_markup_strip_html(text); - g_free(text); - text = g_markup_escape_text(tmp, -1); - g_free(tmp); + text = g_markup_escape_text(jbr->status, -1); } if(jbr->name)