Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 10732:c4cb90065e1d
[gaim-migrate @ 12334]
"gaim_escape_html (according to Ethan) predates
g_markup_escape_text. Current code in Gaim uses both
functions. This patch removes gaim_escape_html from the
API and replaces all calls in the Gaim tree with
g_markup_escape_text. I included a ChangeLog.API note.
As far as I can tell, this still works perfectly.
This is obviously intended for HEAD only, as it removes a
public function." --rlaager
this was discussed extensively this morning
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 26 Mar 2005 02:43:49 +0000 |
parents | c6bf026fcab9 |
children | 55af3fa46329 |
comparison
equal
deleted
inserted
replaced
10731:783ca1f1ebdb | 10732:c4cb90065e1d |
---|---|
3409 * Note: There *may* be some clients which send messages as HTML formatted - | 3409 * Note: There *may* be some clients which send messages as HTML formatted - |
3410 * they need to be special-cased somehow. | 3410 * they need to be special-cased somehow. |
3411 */ | 3411 */ |
3412 if (aim_sn_is_icq(gaim_account_get_username(account)) && aim_sn_is_icq(userinfo->sn)) { | 3412 if (aim_sn_is_icq(gaim_account_get_username(account)) && aim_sn_is_icq(userinfo->sn)) { |
3413 /* being recevied by ICQ from ICQ - escape HTML so it is displayed as sent */ | 3413 /* being recevied by ICQ from ICQ - escape HTML so it is displayed as sent */ |
3414 gchar *tmp2 = gaim_escape_html(tmp); | 3414 gchar *tmp2 = g_markup_escape_text(tmp, -1); |
3415 g_free(tmp); | 3415 g_free(tmp); |
3416 tmp = tmp2; | 3416 tmp = tmp2; |
3417 } | 3417 } |
3418 | 3418 |
3419 serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL)); | 3419 serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL)); |
3804 if (i >= 1) { | 3804 if (i >= 1) { |
3805 gchar *uin = g_strdup_printf("%u", args->uin); | 3805 gchar *uin = g_strdup_printf("%u", args->uin); |
3806 gchar *tmp; | 3806 gchar *tmp; |
3807 | 3807 |
3808 /* If the message came from an ICQ user then escape any HTML */ | 3808 /* If the message came from an ICQ user then escape any HTML */ |
3809 tmp = gaim_escape_html(msg2[0]); | 3809 tmp = g_markup_escape_text(msg2[0], -1); |
3810 | 3810 |
3811 if (t) { /* This is an offline message */ | 3811 if (t) { /* This is an offline message */ |
3812 /* The timestamp is UTC-ish, so we need to get the offset */ | 3812 /* The timestamp is UTC-ish, so we need to get the offset */ |
3813 #ifdef HAVE_TM_GMTOFF | 3813 #ifdef HAVE_TM_GMTOFF |
3814 time_t now; | 3814 time_t now; |
5609 } else { | 5609 } else { |
5610 /* being sent to an AIM user */ | 5610 /* being sent to an AIM user */ |
5611 if (aim_sn_is_icq(gaim_account_get_username(account))) { | 5611 if (aim_sn_is_icq(gaim_account_get_username(account))) { |
5612 /* from an ICQ user */ | 5612 /* from an ICQ user */ |
5613 tmpmsg2 = gaim_strdup_withhtml(message); | 5613 tmpmsg2 = gaim_strdup_withhtml(message); |
5614 tmpmsg = gaim_escape_html(tmpmsg2); | 5614 tmpmsg = g_markup_escape_text(tmpmsg2, -1); |
5615 g_free(tmpmsg2); | 5615 g_free(tmpmsg2); |
5616 } else | 5616 } else |
5617 tmpmsg = gaim_strdup_withhtml(message); | 5617 tmpmsg = gaim_strdup_withhtml(message); |
5618 } | 5618 } |
5619 len = strlen(tmpmsg); | 5619 len = strlen(tmpmsg); |
6793 g_free(charset); | 6793 g_free(charset); |
6794 if (away_utf8 != NULL) { | 6794 if (away_utf8 != NULL) { |
6795 gchar *tmp1, *tmp2; | 6795 gchar *tmp1, *tmp2; |
6796 tmp2 = gaim_markup_strip_html(away_utf8); | 6796 tmp2 = gaim_markup_strip_html(away_utf8); |
6797 g_free(away_utf8); | 6797 g_free(away_utf8); |
6798 tmp1 = gaim_escape_html(tmp2); | 6798 tmp1 = g_markup_escape_text(tmp2, -1); |
6799 g_free(tmp2); | 6799 g_free(tmp2); |
6800 tmp2 = gaim_str_sub_away_formatters(tmp1, gaim_account_get_username(gaim_connection_get_account(gc))); | 6800 tmp2 = gaim_str_sub_away_formatters(tmp1, gaim_account_get_username(gaim_connection_get_account(gc))); |
6801 g_free(tmp1); | 6801 g_free(tmp1); |
6802 g_string_append_printf(str, "\n<b>%s:</b> %s", _("Away Message"), tmp2); | 6802 g_string_append_printf(str, "\n<b>%s:</b> %s", _("Away Message"), tmp2); |
6803 g_free(tmp2); | 6803 g_free(tmp2); |