# HG changeset patch # User Will Thompson # Date 1197823013 0 # Node ID 543306932d153b0426a11ea4c8cbb842ea4f0f7d # Parent f2cf1d61a67657887e24ef693b1ed77eb9104118 Make yahoo_html_to_codes deal with ' in messages being sent. Also correct the size parameter passed to strncmp for various other entities to actually match the right length (previously only "&quo" was being checked to match, for example). diff -r f2cf1d61a676 -r 543306932d15 libpurple/protocols/yahoo/util.c --- a/libpurple/protocols/yahoo/util.c Sat Dec 15 18:23:04 2007 +0000 +++ b/libpurple/protocols/yahoo/util.c Sun Dec 16 16:36:53 2007 +0000 @@ -715,12 +715,15 @@ } else if (((len - i) >= 4) && !strncmp(&src[i], ">", 4)) { g_string_append_c(dest, '>'); i += 3; - } else if (((len - i) >= 5) && !strncmp(&src[i], "&", 4)) { + } else if (((len - i) >= 5) && !strncmp(&src[i], "&", 5)) { g_string_append_c(dest, '&'); i += 4; - } else if (((len - i) >= 6) && !strncmp(&src[i], """, 4)) { + } else if (((len - i) >= 6) && !strncmp(&src[i], """, 6)) { g_string_append_c(dest, '"'); i += 5; + } else if (((len - i) >= 6) && !strncmp(&src[i], "'", 6)) { + g_string_append_c(dest, '\''); + i += 5; } else { g_string_append_c(dest, src[i]); }