Mercurial > pidgin.yaz
comparison libpurple/protocols/msnp9/msn.c @ 22433:616a76954a97
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
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 09 Mar 2008 13:42:54 +0000 |
parents | 6e5d37105189 |
children | 3225c99785b8 efaecb71baad |
comparison
equal
deleted
inserted
replaced
22432:fb54dacfea62 | 22433:616a76954a97 |
---|---|
1480 | 1480 |
1481 static char * | 1481 static char * |
1482 msn_info_strip_search_link(const char *field, size_t len) | 1482 msn_info_strip_search_link(const char *field, size_t len) |
1483 { | 1483 { |
1484 const char *c; | 1484 const char *c; |
1485 if ((c = strstr(field, " (http://spaces.live.com/default.aspx?page=searchresults")) == NULL && | 1485 if ((c = strstr(field, " (http://")) == NULL) |
1486 (c = strstr(field, " (http://spaces.msn.com/default.aspx?page=searchresults")) == NULL) | |
1487 return g_strndup(field, len); | 1486 return g_strndup(field, len); |
1488 return g_strndup(field, c - field); | 1487 return g_strndup(field, c - field); |
1489 } | 1488 } |
1490 | 1489 |
1491 static void | 1490 static void |
1628 | 1627 |
1629 /* Social */ | 1628 /* Social */ |
1630 purple_notify_user_info_add_section_break(user_info); | 1629 purple_notify_user_info_add_section_break(user_info); |
1631 purple_notify_user_info_add_section_header(user_info, _("Social")); | 1630 purple_notify_user_info_add_section_header(user_info, _("Social")); |
1632 | 1631 |
1633 MSN_GOT_INFO_GET_FIELD("Marital status", _("Marital Status")); | 1632 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Marital status", _("Marital Status")); |
1634 MSN_GOT_INFO_GET_FIELD("Interested in", _("Interests")); | 1633 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Interested in", _("Interests")); |
1635 MSN_GOT_INFO_GET_FIELD("Pets", _("Pets")); | 1634 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Pets", _("Pets")); |
1636 MSN_GOT_INFO_GET_FIELD("Hometown", _("Hometown")); | 1635 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Hometown", _("Hometown")); |
1637 MSN_GOT_INFO_GET_FIELD("Places lived", _("Places Lived")); | 1636 MSN_GOT_INFO_GET_FIELD("Places lived", _("Places Lived")); |
1638 MSN_GOT_INFO_GET_FIELD("Fashion", _("Fashion")); | 1637 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Fashion", _("Fashion")); |
1639 MSN_GOT_INFO_GET_FIELD("Humor", _("Humor")); | 1638 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Humor", _("Humor")); |
1640 MSN_GOT_INFO_GET_FIELD("Music", _("Music")); | 1639 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Music", _("Music")); |
1641 MSN_GOT_INFO_GET_FIELD("Favorite quote", _("Favorite Quote")); | 1640 MSN_GOT_INFO_GET_FIELD_NO_SEARCH("Favorite quote", _("Favorite Quote")); |
1642 | 1641 |
1643 if (sect_info) | 1642 if (sect_info) |
1644 { | 1643 { |
1645 has_info = TRUE; | 1644 has_info = TRUE; |
1646 sect_info = FALSE; | 1645 sect_info = FALSE; |