# HG changeset patch # User Luke Schierer # Date 1084059460 0 # Node ID a9ad52960c1c26499be004dd38105e374f444276 # Parent 00138e366ef852a54f513ac6f53fe5619915f45c [gaim-migrate @ 9678] " This patch will fix misdisplayed friendly names/aliases. For example a msn friendly name containing a < would only display the name up until the <. This probably breaks smileys in friendly names (is that such a bad thing?), but if the user has added any formating (///etc) in the alias that will show as text and not as formated.." --Gary Kramlich i prefer the bug he is worried he might have introduced to the bug that he's fixing. committer: Tailor Script diff -r 00138e366ef8 -r a9ad52960c1c src/gtkconv.c --- a/src/gtkconv.c Sat May 08 23:34:30 2004 +0000 +++ b/src/gtkconv.c Sat May 08 23:37:40 2004 +0000 @@ -4635,17 +4635,18 @@ } else { char *new_message = g_memdup(message, length); + char *who_escaped = g_markup_escape_text(who, strlen(who)); if (flags & GAIM_MESSAGE_WHISPER) { str = g_malloc(1024); /* If we're whispering, it's not an autoresponse. */ if (gaim_message_meify(new_message, length)) { - g_snprintf(str, 1024, "***%s", who); + g_snprintf(str, 1024, "***%s", who_escaped); strcpy(color, "#6C2585"); } else { - g_snprintf(str, 1024, "*%s*:", who); + g_snprintf(str, 1024, "*%s*:", who_escaped); strcpy(color, "#00FF00"); } } @@ -4654,9 +4655,9 @@ str = g_malloc(1024); if (flags & GAIM_MESSAGE_AUTO_RESP) - g_snprintf(str, 1024, "%s ***%s", AUTO_RESPONSE, who); + g_snprintf(str, 1024, "%s ***%s", AUTO_RESPONSE, who_escaped); else - g_snprintf(str, 1024, "***%s", who); + g_snprintf(str, 1024, "***%s", who_escaped); if (flags & GAIM_MESSAGE_NICK) strcpy(color, "#AF7F00"); @@ -4666,9 +4667,9 @@ else { str = g_malloc(1024); if (flags & GAIM_MESSAGE_AUTO_RESP) - g_snprintf(str, 1024, "%s %s", who, AUTO_RESPONSE); + g_snprintf(str, 1024, "%s %s", who_escaped, AUTO_RESPONSE); else - g_snprintf(str, 1024, "%s:", who); + g_snprintf(str, 1024, "%s:", who_escaped); if (flags & GAIM_MESSAGE_NICK) strcpy(color, "#AF7F00"); else if (flags & GAIM_MESSAGE_RECV) { @@ -4689,6 +4690,9 @@ else if (flags & GAIM_MESSAGE_SEND) strcpy(color, SEND_COLOR); } + + if(who_escaped) + g_free(who_escaped); } if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps"))