diff src/gtkimhtml.c @ 5093:89c0c811befa

[gaim-migrate @ 5455] jabber XHTML support. since people tend to not like to write valid XHTML all of the time, we now have html_to_xhtml() which does its best to figure out what you meant. i'm tired, hope this works for everyone committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 10 Apr 2003 06:09:26 +0000
parents 04ded2f7253c
children a7e9036cd46f
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Apr 10 00:57:06 2003 +0000
+++ b/src/gtkimhtml.c	Thu Apr 10 06:09:26 2003 +0000
@@ -632,6 +632,9 @@
 	} else if (!g_ascii_strncasecmp (string, "&reg;", 5)) {
 		*replace = '®'; /* was: '®' */
 		*length = 5;
+	} else if (!g_ascii_strncasecmp (string, "&apos;", 6)) {
+		*replace = '\'';
+		*length = 6;
 	} else if (*(string + 1) == '#') {
 		guint pound = 0;
 		if ((sscanf (string, "&#%u;", &pound) == 1) && pound != 0) {
@@ -703,7 +706,7 @@
 	VALID_TAG ("/HEAD");
 	VALID_TAG ("BINARY");
 	VALID_TAG ("/BINARY");
-	
+
 	VALID_OPT_TAG ("HR");
 	VALID_OPT_TAG ("FONT");
 	VALID_OPT_TAG ("BODY");
@@ -711,6 +714,7 @@
 	VALID_OPT_TAG ("IMG");
 	VALID_OPT_TAG ("P");
 	VALID_OPT_TAG ("H3");
+	VALID_OPT_TAG ("HTML");
 
 	if (!g_ascii_strncasecmp(string, "!--", strlen ("!--"))) {
 		gchar *e = strstr (string + strlen("!--"), "-->");
@@ -1170,8 +1174,9 @@
 					}
 				case 47:	/* P (opt) */
 				case 48:	/* H3 (opt) */
+				case 49:	/* HTML (opt) */
 					break;
-				case 49:	/* comment */
+				case 50:	/* comment */
 					NEW_BIT (NEW_TEXT_BIT);
 					if (imhtml->show_comments)
 						wpos = g_snprintf (ws, len, "%s", tag);