pidgin: 9a84e0de: Improve "Get Info" parsing on MSN - igno...
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Sun Mar 9 09:50:38 EDT 2008
-----------------------------------------------------------------
Revision: 9a84e0de845c1f3dd905e9cab87603a4f600a33f
Ancestor: 8456404eadb372171831c58434d864e66adae25c
Author: nosnilmot at pidgin.im
Date: 2008-03-09T13:42:54
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/9a84e0de845c1f3dd905e9cab87603a4f600a33f
Modified files:
libpurple/protocols/msn/msn.c
libpurple/protocols/msnp9/msn.c
ChangeLog:
Improve "Get Info" parsing on MSN - ignore all URLs in fields instead of
playing chase-the-search-url, and ignore some more search linkified fields
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c 71e1d8ffc4ae2d0cfd3016632bb534b8ef18ecd9
+++ libpurple/protocols/msn/msn.c fb67f97a150122a78ff4877795ef9982659514b3
@@ -1774,15 +1774,15 @@ msn_got_info(PurpleUtilFetchUrlData *url
purple_notify_user_info_add_section_break(user_info);
purple_notify_user_info_add_section_header(user_info, _("Social"));
- MSN_GOT_INFO_GET_FIELD("Marital status", _("Marital Status"));
- MSN_GOT_INFO_GET_FIELD("Interested in", _("Interests"));
- MSN_GOT_INFO_GET_FIELD("Pets", _("Pets"));
- MSN_GOT_INFO_GET_FIELD("Hometown", _("Hometown"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Marital status", _("Marital Status"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Interested in", _("Interests"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Pets", _("Pets"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Hometown", _("Hometown"));
MSN_GOT_INFO_GET_FIELD("Places lived", _("Places Lived"));
- MSN_GOT_INFO_GET_FIELD("Fashion", _("Fashion"));
- MSN_GOT_INFO_GET_FIELD("Humor", _("Humor"));
- MSN_GOT_INFO_GET_FIELD("Music", _("Music"));
- MSN_GOT_INFO_GET_FIELD("Favorite quote", _("Favorite Quote"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Fashion", _("Fashion"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Humor", _("Humor"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Music", _("Music"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Favorite quote", _("Favorite Quote"));
if (sect_info)
{
============================================================
--- libpurple/protocols/msnp9/msn.c 1daf6dbd4257855685b39a4c731478e11f74a869
+++ libpurple/protocols/msnp9/msn.c bd6d7e84f054e7187c8245067e2ef2692785dc86
@@ -1482,8 +1482,7 @@ msn_info_strip_search_link(const char *f
msn_info_strip_search_link(const char *field, size_t len)
{
const char *c;
- if ((c = strstr(field, " (http://spaces.live.com/default.aspx?page=searchresults")) == NULL &&
- (c = strstr(field, " (http://spaces.msn.com/default.aspx?page=searchresults")) == NULL)
+ if ((c = strstr(field, " (http://")) == NULL)
return g_strndup(field, len);
return g_strndup(field, c - field);
}
@@ -1630,15 +1629,15 @@ msn_got_info(PurpleUtilFetchUrlData *url
purple_notify_user_info_add_section_break(user_info);
purple_notify_user_info_add_section_header(user_info, _("Social"));
- MSN_GOT_INFO_GET_FIELD("Marital status", _("Marital Status"));
- MSN_GOT_INFO_GET_FIELD("Interested in", _("Interests"));
- MSN_GOT_INFO_GET_FIELD("Pets", _("Pets"));
- MSN_GOT_INFO_GET_FIELD("Hometown", _("Hometown"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Marital status", _("Marital Status"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Interested in", _("Interests"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Pets", _("Pets"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Hometown", _("Hometown"));
MSN_GOT_INFO_GET_FIELD("Places lived", _("Places Lived"));
- MSN_GOT_INFO_GET_FIELD("Fashion", _("Fashion"));
- MSN_GOT_INFO_GET_FIELD("Humor", _("Humor"));
- MSN_GOT_INFO_GET_FIELD("Music", _("Music"));
- MSN_GOT_INFO_GET_FIELD("Favorite quote", _("Favorite Quote"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Fashion", _("Fashion"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Humor", _("Humor"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Music", _("Music"));
+ MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Favorite quote", _("Favorite Quote"));
if (sect_info)
{
More information about the Commits
mailing list