# HG changeset patch # User Mark Doliner # Date 1250751284 0 # Node ID 83a3b3b5976ace3f82ebffb076fe969fb940aa7e # Parent c9e760d350b8c0548a766aeedb9c0a71a8e70436 Oh, I guess we should escape this when printing to the debug window. We do this same thing for outgoing messages diff -r c9e760d350b8 -r 83a3b3b5976a libpurple/protocols/yahoo/util.c --- a/libpurple/protocols/yahoo/util.c Thu Aug 20 06:26:21 2009 +0000 +++ b/libpurple/protocols/yahoo/util.c Thu Aug 20 06:54:44 2009 +0000 @@ -513,7 +513,7 @@ int i, j; gboolean no_more_gt_brackets = FALSE; const char *match; - gchar *xmlstr1, *xmlstr2; + gchar *xmlstr1, *xmlstr2, *esc; x_len = strlen(x); html = xmlnode_new("html"); @@ -660,7 +660,10 @@ xmlstr2 = g_strndup(xmlstr1 + 6, strlen(xmlstr1) - 13); g_free(xmlstr1); - purple_debug_misc("yahoo", "yahoo_codes_to_html(%s)=%s\n", x, xmlstr2); + esc = g_strescape(x, NULL); + purple_debug_misc("yahoo", "yahoo_codes_to_html(%s)=%s\n", esc, xmlstr2); + g_free(esc); + return xmlstr2; }