# HG changeset patch # User Mark Doliner # Date 1065928538 0 # Node ID 03f22e56431155aad29bfddb686587265c762cd0 # Parent cd0cedf0edd015db46839b3655530dfa4ecd819c [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 diff -r cd0cedf0edd0 -r 03f22e564311 gaim.spec.in --- a/gaim.spec.in Sat Oct 11 01:58:59 2003 +0000 +++ b/gaim.spec.in Sun Oct 12 03:15:38 2003 +0000 @@ -11,8 +11,8 @@ Packager: Rob Flynn BuildRoot: %{_tmppath}/%{name}-%{version}-root %if "%{_vendor}" != "MandrakeSoft" -Requires: gtk2 >= 2.0.0, mozilla-nss -BuildRequires: libao-devel, gtk2-devel, gtkspell-devel, libtool, audiofile-devel, pkgconfig, mozilla-nss-devel +Requires: gtk2 >= 2.0.0, mozilla-nss, gtkspell, audiofile, libao +BuildRequires: libao-devel, gtk2-devel, gtkspell-devel, libtool, audiofile-devel, libao-devel, pkgconfig, mozilla-nss-devel %else Requires: gtk+2.0 >= 2.0.0, libnss3 BuildRequires: libao-devel, libgtk+2.0_0-devel, gtkspell-devel, libtool, audiofile-devel, pkgconfig, libnss3-devel diff -r cd0cedf0edd0 -r 03f22e564311 src/protocols/oscar/locate.c --- a/src/protocols/oscar/locate.c Sat Oct 11 01:58:59 2003 +0000 +++ b/src/protocols/oscar/locate.c Sun Oct 12 03:15:38 2003 +0000 @@ -218,7 +218,7 @@ free(cur->info_encoding); cur->info = (char *)malloc(userinfo->info_len); memcpy(cur->info, userinfo->info, userinfo->info_len); - cur->info_encoding = strdup(userinfo->info_encoding); /* XXX - This seems to leak occasionally */ + cur->info_encoding = strdup(userinfo->info_encoding); cur->info_len = userinfo->info_len; } @@ -227,7 +227,7 @@ free(cur->away_encoding); cur->away = (char *)malloc(userinfo->away_len); memcpy(cur->away, userinfo->away, userinfo->away_len); - cur->away_encoding = strdup(userinfo->away_encoding); /* XXX - This seems to leak occasionally */ + cur->away_encoding = strdup(userinfo->away_encoding); cur->away_len = userinfo->away_len; } } diff -r cd0cedf0edd0 -r 03f22e564311 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sat Oct 11 01:58:59 2003 +0000 +++ b/src/protocols/oscar/oscar.c Sun Oct 12 03:15:38 2003 +0000 @@ -4356,7 +4356,7 @@ if (od->icq && isdigit(name[0])) aim_icq_getallinfo(od->sess, name); else - aim_locate_getinfoshort(od->sess, name, 0x00000007); + aim_locate_getinfoshort(od->sess, name, 0x00000003); } static void oscar_get_away(GaimConnection *gc, const char *who) { @@ -5425,8 +5425,10 @@ tmp1 = gaim_strreplace(away_utf8, "
", "\n"); tmp2 = gaim_markup_strip_html(tmp1); g_free(tmp1); - tmp3 = gaim_str_sub_away_formatters(tmp2, gaim_account_get_username(gaim_connection_get_account(gc))); + tmp1 = g_markup_escape_text(tmp2, strlen(tmp2)); g_free(tmp2); + tmp3 = gaim_str_sub_away_formatters(tmp1, gaim_account_get_username(gaim_connection_get_account(gc))); + g_free(tmp1); tmp = ret; ret = g_strconcat(tmp, _("Away Message: "), tmp3, "\n", NULL); g_free(tmp);