comparison 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
comparison
equal deleted inserted replaced
5092:a4ad609ee6b3 5093:89c0c811befa
630 *replace = '\"'; 630 *replace = '\"';
631 *length = 6; 631 *length = 6;
632 } else if (!g_ascii_strncasecmp (string, "&reg;", 5)) { 632 } else if (!g_ascii_strncasecmp (string, "&reg;", 5)) {
633 *replace = '®'; /* was: '®' */ 633 *replace = '®'; /* was: '®' */
634 *length = 5; 634 *length = 5;
635 } else if (!g_ascii_strncasecmp (string, "&apos;", 6)) {
636 *replace = '\'';
637 *length = 6;
635 } else if (*(string + 1) == '#') { 638 } else if (*(string + 1) == '#') {
636 guint pound = 0; 639 guint pound = 0;
637 if ((sscanf (string, "&#%u;", &pound) == 1) && pound != 0) { 640 if ((sscanf (string, "&#%u;", &pound) == 1) && pound != 0) {
638 if (*(string + 3 + (gint)log10 (pound)) != ';') 641 if (*(string + 3 + (gint)log10 (pound)) != ';')
639 return FALSE; 642 return FALSE;
701 VALID_TAG ("FONT"); 704 VALID_TAG ("FONT");
702 VALID_TAG ("HEAD"); 705 VALID_TAG ("HEAD");
703 VALID_TAG ("/HEAD"); 706 VALID_TAG ("/HEAD");
704 VALID_TAG ("BINARY"); 707 VALID_TAG ("BINARY");
705 VALID_TAG ("/BINARY"); 708 VALID_TAG ("/BINARY");
706 709
707 VALID_OPT_TAG ("HR"); 710 VALID_OPT_TAG ("HR");
708 VALID_OPT_TAG ("FONT"); 711 VALID_OPT_TAG ("FONT");
709 VALID_OPT_TAG ("BODY"); 712 VALID_OPT_TAG ("BODY");
710 VALID_OPT_TAG ("A"); 713 VALID_OPT_TAG ("A");
711 VALID_OPT_TAG ("IMG"); 714 VALID_OPT_TAG ("IMG");
712 VALID_OPT_TAG ("P"); 715 VALID_OPT_TAG ("P");
713 VALID_OPT_TAG ("H3"); 716 VALID_OPT_TAG ("H3");
717 VALID_OPT_TAG ("HTML");
714 718
715 if (!g_ascii_strncasecmp(string, "!--", strlen ("!--"))) { 719 if (!g_ascii_strncasecmp(string, "!--", strlen ("!--"))) {
716 gchar *e = strstr (string + strlen("!--"), "-->"); 720 gchar *e = strstr (string + strlen("!--"), "-->");
717 if (e) { 721 if (e) {
718 *len = e - string + strlen ("-->"); 722 *len = e - string + strlen ("-->");
1168 g_free(datasize); 1172 g_free(datasize);
1169 g_free(src); 1173 g_free(src);
1170 } 1174 }
1171 case 47: /* P (opt) */ 1175 case 47: /* P (opt) */
1172 case 48: /* H3 (opt) */ 1176 case 48: /* H3 (opt) */
1173 break; 1177 case 49: /* HTML (opt) */
1174 case 49: /* comment */ 1178 break;
1179 case 50: /* comment */
1175 NEW_BIT (NEW_TEXT_BIT); 1180 NEW_BIT (NEW_TEXT_BIT);
1176 if (imhtml->show_comments) 1181 if (imhtml->show_comments)
1177 wpos = g_snprintf (ws, len, "%s", tag); 1182 wpos = g_snprintf (ws, len, "%s", tag);
1178 NEW_BIT (NEW_COMMENT_BIT); 1183 NEW_BIT (NEW_COMMENT_BIT);
1179 break; 1184 break;