Mercurial > pidgin
comparison src/util.c @ 8534:389e2b9dae6a
[gaim-migrate @ 9273]
this should get rid of the </FONT> on the ends of lines from AIM users in logs
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 31 Mar 2004 05:53:48 +0000 |
parents | 5cb93726e4d5 |
children | 848dfa9fe9d4 |
comparison
equal
deleted
inserted
replaced
8533:ef3d81aa663a | 8534:389e2b9dae6a |
---|---|
756 g_free(pt); | 756 g_free(pt); |
757 } | 757 } |
758 g_free(tag->data); | 758 g_free(tag->data); |
759 tags = g_list_remove(tags, tag->data); | 759 tags = g_list_remove(tags, tag->data); |
760 } else { | 760 } else { |
761 /* we tried to close a tag we never opened! escape it | 761 /* a closing tag we weren't expecting... |
762 * and move on */ | 762 * we'll let it slide, if it's really a tag...if it's |
763 xhtml = g_string_append(xhtml, "<"); | 763 * just a </ we'll escape it properly */ |
764 plain = g_string_append_c(plain, '<'); | 764 const char *end = c+2; |
765 c++; | 765 while(*end && g_ascii_isalpha(*end)) |
766 end++; | |
767 if(*end == '>') { | |
768 c = end+1; | |
769 } else { | |
770 xhtml = g_string_append(xhtml, "<"); | |
771 plain = g_string_append_c(plain, '<'); | |
772 c++; | |
773 } | |
766 } | 774 } |
767 } else { /* opening tag */ | 775 } else { /* opening tag */ |
768 ALLOW_TAG("a"); | 776 ALLOW_TAG("a"); |
769 ALLOW_TAG_ALT("b", "strong"); | 777 ALLOW_TAG_ALT("b", "strong"); |
770 ALLOW_TAG("blockquote"); | 778 ALLOW_TAG("blockquote"); |