changeset 27630:c90de665e042

merge of '51da76f83bc049dc92e4199b15f634d001a5fa02' and '80e8cabf693147bcebc8857d383b6aab279d75ae'
author Paul Aurich <paul@darkrain42.org>
date Sun, 19 Jul 2009 19:38:35 +0000
parents 5d75276a575f (current diff) 3edd01d04004 (diff)
children 6dd89408ded4
files
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Sun Jul 19 19:07:54 2009 +0000
+++ b/libpurple/util.c	Sun Jul 19 19:38:35 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");