changeset 28451:18e361e0a3ec

merge of 'b09ff62192fe7c44793b7aebbae3814fb649671d' and 'f1167f906624ca218b6fd2a39b10be205ca99892'
author Paul Aurich <paul@darkrain42.org>
date Wed, 26 Aug 2009 05:56:20 +0000
parents 7a211be81a6b (diff) 1b534812157d (current diff)
children 336d03cdced6 c9c038529f38 268b821de5c5
files
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Wed Aug 26 03:59:49 2009 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Wed Aug 26 05:56:20 2009 +0000
@@ -2405,6 +2405,21 @@
 	if (purple_markup_find_tag("body", tmp, &start, &end, &attribs))
 	{
 		const char *ichattextcolor, *ichatballooncolor;
+		const char *start2, *end2;
+		GData *unused;
+
+		/*
+		 * Find the ending </body> so we can strip off the outer <html/>
+		 * and <body/>
+		 */
+		if (purple_markup_find_tag("/body", end + 1, &start2, &end2, &unused))
+		{
+			gchar *tmp2;
+			tmp2 = g_strndup(end + 1, (start2 - 1) - (end + 1) + 1);
+			g_free(tmp);
+			tmp = tmp2;
+			g_datalist_clear(&unused);
+		}
 
 		ichattextcolor = g_datalist_get_data(&attribs, "ichattextcolor");
 		if (ichattextcolor != NULL)