changeset 9264:cea7eba5f494

[gaim-migrate @ 10063] Patch by Stu Tomlinson (#959490) to handle &nbsp;, &apos; and HTML entities in msn_import_html() and to prevent an infinite loop when encountering unknown entities. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 11 Jun 2004 00:23:13 +0000
parents 70153c759016
children 6a1f2c444ee7
files src/protocols/msn/utils.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/utils.c	Fri Jun 11 00:18:36 2004 +0000
+++ b/src/protocols/msn/utils.c	Fri Jun 11 00:23:13 2004 +0000
@@ -290,6 +290,11 @@
 				msg[retcount++] = '>';
 				c += 4;
 			}
+			else if (!g_ascii_strncasecmp(c, "&nbsp;", 6))
+			{
+				msg[retcount++] = ' ';
+				c += 6;
+			}
 			else if (!g_ascii_strncasecmp(c, "&quot;", 6))
 			{
 				msg[retcount++] = '"';
@@ -300,6 +305,13 @@
 				msg[retcount++] = '&';
 				c += 5;
 			}
+			else if (!g_ascii_strncasecmp(c, "&apos;", 6))
+			{
+				msg[retcount++] = '\'';
+				c += 6;
+			}
+			else
+				msg[retcount++] = *c++;
 		}
 		else
 			msg[retcount++] = *c++;