# HG changeset patch # User Mark Doliner # Date 1248032023 0 # Node ID 3edd01d04004b1b0b8eac96e31f97eddd1cee4fd # Parent d1b882345f5b6e39b119e53cd56abeb220a893f4 disapproval of revision '0a9f6836dbe4facb38768025e830328a50c5ddd8' diff -r d1b882345f5b -r 3edd01d04004 libpurple/util.c --- a/libpurple/util.c Sun Jul 19 16:31:32 2009 +0000 +++ b/libpurple/util.c Sun Jul 19 19:33:43 2009 +0000 @@ -1409,8 +1409,7 @@ gboolean ignore; }; -#define ALLOW_TAG_ALT(x, y) do { \ - if(!g_ascii_strncasecmp(c, "<" x " ", strlen("<" x " "))) { \ +#define ALLOW_TAG_ALT(x, y) if(!g_ascii_strncasecmp(c, "<" x " ", strlen("<" x " "))) { \ const char *o = c + strlen("<" x); \ const char *p = NULL, *q = NULL, *r = NULL; \ GString *innards = g_string_new(""); \ @@ -1481,7 +1480,6 @@ c = strchr(c, '>') + 1; \ continue; \ } \ - } while (0); #define ALLOW_TAG(x) ALLOW_TAG_ALT(x, x) void purple_markup_html_to_xhtml(const char *html, char **xhtml_out, @@ -1574,8 +1572,9 @@ ALLOW_TAG("h5"); ALLOW_TAG("h6"); /* we only allow html to start the message */ - if(c == html) + if(c == html) { ALLOW_TAG("html"); + } ALLOW_TAG_ALT("i", "em"); ALLOW_TAG_ALT("italic", "em"); ALLOW_TAG("li");