im.pidgin.pidgin: 2e5cda103238f64d27e4ed5aa92c149f6d50a5ec
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Mon Dec 17 15:40:39 EST 2007
-----------------------------------------------------------------
Revision: 2e5cda103238f64d27e4ed5aa92c149f6d50a5ec
Ancestor: 3b04d5ecc995b2c4af8919299fcc785383d82ded
Author: nosnilmot at pidgin.im
Date: 2007-12-17T20:37:30
Branch: im.pidgin.pidgin
Modified files:
libpurple/status.c
ChangeLog:
Escape system log messages before sending to the loggers. Fixes #4426
-------------- next part --------------
============================================================
--- libpurple/status.c 49f4ec3f0c1118a8750d60e0fc8d0b95cd1547d5
+++ libpurple/status.c 14251f1ce9442881421d3d7c7fd34055b4806a2c
@@ -607,13 +607,10 @@ notify_buddy_status_update(PurpleBuddy *
if (old_status != NULL)
{
- tmp = g_strdup_printf(_("%s changed status from %s to %s"), buddy_alias,
+ tmp = g_strdup_printf(_("%s (%s) changed status from %s to %s"), buddy_alias, buddy->name,
purple_status_get_name(old_status),
purple_status_get_name(new_status));
- logtmp = g_strdup_printf(_("%s (%s) changed status from %s to %s"), buddy_alias, buddy->name,
- purple_status_get_name(old_status),
- purple_status_get_name(new_status));
-
+ logtmp = g_markup_escape_text(tmp, -1);
}
else
{
@@ -621,18 +618,15 @@ notify_buddy_status_update(PurpleBuddy *
if (purple_status_is_active(new_status))
{
- tmp = g_strdup_printf(_("%s is now %s"), buddy_alias,
+ tmp = g_strdup_printf(_("%s (%s) is now %s"), buddy_alias, buddy->name,
purple_status_get_name(new_status));
- logtmp = g_strdup_printf(_("%s (%s) is now %s"), buddy_alias, buddy->name,
- purple_status_get_name(new_status));
-
+ logtmp = g_markup_escape_text(tmp, -1);
}
else
{
- tmp = g_strdup_printf(_("%s is no longer %s"), buddy_alias,
+ tmp = g_strdup_printf(_("%s (%s) is no longer %s"), buddy_alias, buddy->name,
purple_status_get_name(new_status));
- logtmp = g_strdup_printf(_("%s (%s) is no longer %s"), buddy_alias, buddy->name,
- purple_status_get_name(new_status));
+ logtmp = g_markup_escape_text(tmp, -1);
}
}
@@ -1244,12 +1238,15 @@ update_buddy_idle(PurpleBuddy *buddy, Pu
if (log != NULL)
{
- char *tmp = g_strdup_printf(_("%s became idle"),
+ char *tmp, *tmp2;
+ tmp = g_strdup_printf(_("%s became idle"),
purple_buddy_get_alias(buddy));
+ tmp2 = g_markup_escape_text(tmp, -1);
+ g_free(tmp);
purple_log_write(log, PURPLE_MESSAGE_SYSTEM,
- purple_buddy_get_alias(buddy), current_time, tmp);
- g_free(tmp);
+ purple_buddy_get_alias(buddy), current_time, tmp2);
+ g_free(tmp2);
}
}
}
@@ -1261,12 +1258,15 @@ update_buddy_idle(PurpleBuddy *buddy, Pu
if (log != NULL)
{
- char *tmp = g_strdup_printf(_("%s became unidle"),
+ char *tmp, *tmp2;
+ tmp = g_strdup_printf(_("%s became unidle"),
purple_buddy_get_alias(buddy));
+ tmp2 = g_markup_escape_text(tmp, -1);
+ g_free(tmp);
purple_log_write(log, PURPLE_MESSAGE_SYSTEM,
- purple_buddy_get_alias(buddy), current_time, tmp);
- g_free(tmp);
+ purple_buddy_get_alias(buddy), current_time, tmp2);
+ g_free(tmp2);
}
}
}
@@ -1321,13 +1321,15 @@ purple_presence_set_idle(PurplePresence
if (log != NULL)
{
- char *msg;
+ char *msg, *tmp;
if (idle)
- msg = g_strdup_printf(_("+++ %s became idle"), purple_account_get_username(account));
+ tmp = g_strdup_printf(_("+++ %s became idle"), purple_account_get_username(account));
else
- msg = g_strdup_printf(_("+++ %s became unidle"), purple_account_get_username(account));
+ tmp = g_strdup_printf(_("+++ %s became unidle"), purple_account_get_username(account));
+ msg = g_markup_escape_text(tmp, -1);
+ g_free(tmp);
purple_log_write(log, PURPLE_MESSAGE_SYSTEM,
purple_account_get_username(account),
(idle ? idle_time : current_time), msg);
More information about the Commits
mailing list