From: <rl...@us...> - 2006-06-19 05:57:18
|
Revision: 16283 Author: rlaager Date: 2006-06-18 22:57:11 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16283&view=rev Log Message: ----------- SF Patch #1500688 from Brian Chu (roast) He already committed this to his soc-2006-file-loggers branch. Here's the patch description: In util.c, gaim_markup_html_to_xhtml() doesn't trim spaces of parsed background colors, parsed font names, or the end result for styles (which inserted spaces for the purpose of many span.style attributes). For example, things like this get written to the log: <span style='font-size: small; '> Things like the following this _can_ written to the log given a tag like this: <font face=" Comic Sans MS "> <span style='font-family: Comic Sans MS ; '> Same for: <body bgcolor=" Red "> <span style='background: Red ;'> Modified Paths: -------------- trunk/COPYRIGHT trunk/src/util.c Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2006-06-19 05:39:30 UTC (rev 16282) +++ trunk/COPYRIGHT 2006-06-19 05:57:11 UTC (rev 16283) @@ -51,6 +51,7 @@ Christophe Chapuis Ka-Hing Cheung Sadrul Habib Chowdhury +Brian Chu Arturo Cisneros, Jr. Vincas Ciziunas Jonathan Clark Modified: trunk/src/util.c =================================================================== --- trunk/src/util.c 2006-06-19 05:39:30 UTC (rev 16282) +++ trunk/src/util.c 2006-06-19 05:57:11 UTC (rev 16283) @@ -1342,7 +1342,7 @@ face = g_string_append_c(face, *q); q++; } - g_string_append_printf(style, "font-family: %s; ", face->str); + g_string_append_printf(style, "font-family: %s; ", g_strstrip(face->str)); g_string_free(face, TRUE); p = q; } else if(!g_ascii_strncasecmp(p, "size=", strlen("size="))) { @@ -1392,7 +1392,7 @@ pt->dest_tag = "span"; tags = g_list_prepend(tags, pt); if(style->len) - g_string_append_printf(xhtml, "<span style='%s'>", style->str); + g_string_append_printf(xhtml, "<span style='%s'>", g_strstrip(style->str)); else pt->ignore = TRUE; g_string_free(style, TRUE); @@ -1412,7 +1412,7 @@ color = g_string_append_c(color, *q); q++; } - g_string_append_printf(xhtml, "<span style='background: %s;'>", color->str); + g_string_append_printf(xhtml, "<span style='background: %s;'>", g_strstrip(color->str)); g_string_free(color, TRUE); if ((c = strchr(c, '>')) != NULL) c++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |