Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 7235:03f22e564311
[gaim-migrate @ 7810]
I added some deps to the rpm, those should be there,
right?
Also...
[ 821937 ] Fix for away message tooltip
In Gaim 0.71, the tooltip text for Oscar is not
properly escaped. This causes away messages such as
"failed <-- this is a fact, not a prediction" to break
the tooltip. Other protocols do not have this issue,
since they call g_markup_escape_text() in the
appropriate places.
The call to gaim_markup_strip_html() is not sufficient
in cases such as the example, since complete HTML tags
are not present but HTML special characters are.
This patch simply calls g_markup_escape_text() before
adding the away message to the tooltip text. Patch is
against the 0.71 source, since I don't think anoymous
CVS is up-to-date.
--Daniel Westermann-Clark (potpieman)
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 12 Oct 2003 03:15:38 +0000 |
parents | 7c43dbbb198c |
children | 0ed4d53c46f9 |
comparison
equal
deleted
inserted
replaced
7234:cd0cedf0edd0 | 7235:03f22e564311 |
---|---|
4354 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | 4354 struct oscar_data *od = (struct oscar_data *)gc->proto_data; |
4355 | 4355 |
4356 if (od->icq && isdigit(name[0])) | 4356 if (od->icq && isdigit(name[0])) |
4357 aim_icq_getallinfo(od->sess, name); | 4357 aim_icq_getallinfo(od->sess, name); |
4358 else | 4358 else |
4359 aim_locate_getinfoshort(od->sess, name, 0x00000007); | 4359 aim_locate_getinfoshort(od->sess, name, 0x00000003); |
4360 } | 4360 } |
4361 | 4361 |
4362 static void oscar_get_away(GaimConnection *gc, const char *who) { | 4362 static void oscar_get_away(GaimConnection *gc, const char *who) { |
4363 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | 4363 struct oscar_data *od = (struct oscar_data *)gc->proto_data; |
4364 if (od->icq) { | 4364 if (od->icq) { |
5423 gchar *tmp1, *tmp2; | 5423 gchar *tmp1, *tmp2; |
5424 const char *tmp3; | 5424 const char *tmp3; |
5425 tmp1 = gaim_strreplace(away_utf8, "<BR>", "\n"); | 5425 tmp1 = gaim_strreplace(away_utf8, "<BR>", "\n"); |
5426 tmp2 = gaim_markup_strip_html(tmp1); | 5426 tmp2 = gaim_markup_strip_html(tmp1); |
5427 g_free(tmp1); | 5427 g_free(tmp1); |
5428 tmp3 = gaim_str_sub_away_formatters(tmp2, gaim_account_get_username(gaim_connection_get_account(gc))); | 5428 tmp1 = g_markup_escape_text(tmp2, strlen(tmp2)); |
5429 g_free(tmp2); | 5429 g_free(tmp2); |
5430 tmp3 = gaim_str_sub_away_formatters(tmp1, gaim_account_get_username(gaim_connection_get_account(gc))); | |
5431 g_free(tmp1); | |
5430 tmp = ret; | 5432 tmp = ret; |
5431 ret = g_strconcat(tmp, _("<b>Away Message:</b> "), tmp3, "\n", NULL); | 5433 ret = g_strconcat(tmp, _("<b>Away Message:</b> "), tmp3, "\n", NULL); |
5432 g_free(tmp); | 5434 g_free(tmp); |
5433 g_free(away_utf8); | 5435 g_free(away_utf8); |
5434 } | 5436 } |