im.pidgin.pidgin: 4268f3923b30680b7ec013f553a7733f4b24417d

resiak at soc.pidgin.im resiak at soc.pidgin.im
Sun Dec 16 11:40:46 EST 2007


-----------------------------------------------------------------
Revision: 4268f3923b30680b7ec013f553a7733f4b24417d
Ancestor: eaa0690375b1928f9f87cf83d2bb4da4026709a7
Author: resiak at soc.pidgin.im
Date: 2007-12-16T16:36:53
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/yahoo/util.c

ChangeLog: 

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).

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/util.c	5d981e5e77d4c827b0f45eb89498cdb1db587041
+++ libpurple/protocols/yahoo/util.c	fb236d5bfec5c83ba0ba489854df865c9d47a3a4
@@ -715,12 +715,15 @@ char *yahoo_html_to_codes(const char *sr
 			} 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]);
 			}


More information about the Commits mailing list