# HG changeset patch # User Jeffrey Connelly # Date 1188796652 0 # Node ID dd4b1dc8a0cec316e243b1ee7152949e24eeeac9 # Parent d6802883e96e1a6b6c99a01218eaaac248f3fd8b# Parent de0ae9a3eee2d6b5c801a6e5f56127750f314f43 merge of '037dd557f9293f0488bb536ed85c24acddad6553' and '384f42f64ff505bcf56a860f6b79a6bf44cc1304' diff -r de0ae9a3eee2 -r dd4b1dc8a0ce Doxyfile.in diff -r de0ae9a3eee2 -r dd4b1dc8a0ce autogen.sh diff -r de0ae9a3eee2 -r dd4b1dc8a0ce doc/TracHeader.html diff -r de0ae9a3eee2 -r dd4b1dc8a0ce finch/finch.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce finch/libgnt/gntmenu.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce finch/libgnt/test/Makefile diff -r de0ae9a3eee2 -r dd4b1dc8a0ce finch/libgnt/test/file.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce finch/libgnt/test/menu.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce finch/libgnt/test/tv.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/Makefile.am diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/certificate.h diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/conversation.h diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/eventloop.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/example/nullclient.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/ft.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/plugins/autoaccept.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/plugins/dbus-example.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/plugins/statenotify.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/protocols/myspace/markup.c --- a/libpurple/protocols/myspace/markup.c Sun Sep 02 08:00:54 2007 +0000 +++ b/libpurple/protocols/myspace/markup.c Mon Sep 03 05:17:32 2007 +0000 @@ -669,6 +669,8 @@ /** High-level function to convert Purple (HTML) to MySpaceIM markup. * + * TODO: consider using purple_markup_html_to_xhtml() to make valid XML. + * * @return HTML markup string, must be g_free()'d. */ gchar * html_to_msim_markup(MsimSession *session, const gchar *raw) diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Sun Sep 02 08:00:54 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Mon Sep 03 05:17:32 2007 +0000 @@ -1066,9 +1066,12 @@ statstring = purple_status_get_attr_string(status, "message"); if (!statstring) { - statstring = g_strdup(""); + statstring = ""; } + /* Status strings are plain text. */ + statstring = purple_markup_strip_html(statstring); + msim_set_status_code(session, status_code, g_strdup(statstring)); } @@ -1713,7 +1716,7 @@ PurpleBuddyList *blist; MsimUser *user; GList *list; - gchar *status_headline; + gchar *status_headline, *status_headline_escaped; gint status_code, purple_status_code; gchar *username; @@ -1768,8 +1771,16 @@ purple_debug_info("msim", "msim_status: found buddy %s\n", username); } + /* The status headline is plaintext, but libpurple treats it as HTML, + * so escape any HTML characters to their entity equivalents. */ + status_headline_escaped = g_markup_escape_text(status_headline, strlen(status_headline)); + g_free(status_headline); + + if (user->headline) + g_free(user->headline); + /* don't copy; let the MsimUser own the headline, memory-wise */ - user->headline = status_headline; + user->headline = status_headline_escaped; /* Set user status */ switch (status_code) { diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/proxy.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce libpurple/util.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce pidgin/gtkimhtml.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce pidgin/gtkmain.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce pidgin/gtkplugin.c diff -r de0ae9a3eee2 -r dd4b1dc8a0ce pidgin/plugins/perl/common/GtkDialogs.xs