/cpw/tomkiewicz/gg11: a578366cd35e: Gadu-Gadu: fix sending links

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Sat Feb 2 09:21:28 EST 2013


Changeset: a578366cd35e1255139ca0dcb524e03c7be01aad
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-02-02 15:21 +0100
Branch:	 default
URL: http://hg.pidgin.im/cpw/tomkiewicz/gg11/rev/a578366cd35e

Description:

Gadu-Gadu: fix sending links

diffstat:

 libpurple/protocols/gg/html.c         |  26 ++++++++++++--------------
 libpurple/protocols/gg/html.h         |   1 -
 libpurple/protocols/gg/message-prpl.c |   2 +-
 3 files changed, 13 insertions(+), 16 deletions(-)

diffs (70 lines):

diff --git a/libpurple/protocols/gg/html.c b/libpurple/protocols/gg/html.c
--- a/libpurple/protocols/gg/html.c
+++ b/libpurple/protocols/gg/html.c
@@ -130,31 +130,29 @@ int ggp_html_decode_color(const gchar *s
 
 ggp_html_tag ggp_html_parse_tag(const gchar *tag_str)
 {
-	if (0 == strcmp(tag_str, "eom"))
+	if (0 == g_ascii_strcasecmp(tag_str, "eom"))
 		return GGP_HTML_TAG_EOM;
-	if (0 == strcmp(tag_str, "span"))
+	if (0 == g_ascii_strcasecmp(tag_str, "span"))
 		return GGP_HTML_TAG_SPAN;
-	if (0 == strcmp(tag_str, "div"))
+	if (0 == g_ascii_strcasecmp(tag_str, "div"))
 		return GGP_HTML_TAG_DIV;
-	if (0 == strcmp(tag_str, "br"))
+	if (0 == g_ascii_strcasecmp(tag_str, "br"))
 		return GGP_HTML_TAG_BR;
-	if (0 == strcmp(tag_str, "a"))
+	if (0 == g_ascii_strcasecmp(tag_str, "a"))
 		return GGP_HTML_TAG_A;
-	if (0 == strcmp(tag_str, "b"))
+	if (0 == g_ascii_strcasecmp(tag_str, "b"))
 		return GGP_HTML_TAG_B;
-	if (0 == strcmp(tag_str, "i"))
+	if (0 == g_ascii_strcasecmp(tag_str, "i"))
 		return GGP_HTML_TAG_I;
-	if (0 == strcmp(tag_str, "u"))
+	if (0 == g_ascii_strcasecmp(tag_str, "u"))
 		return GGP_HTML_TAG_U;
-	if (0 == strcmp(tag_str, "s"))
+	if (0 == g_ascii_strcasecmp(tag_str, "s"))
 		return GGP_HTML_TAG_S;
-	if (0 == strcmp(tag_str, "img"))
+	if (0 == g_ascii_strcasecmp(tag_str, "img"))
 		return GGP_HTML_TAG_IMG;
-	if (0 == strcmp(tag_str, "font"))
+	if (0 == g_ascii_strcasecmp(tag_str, "font"))
 		return GGP_HTML_TAG_FONT;
-	if (0 == strcmp(tag_str, "hr"))
+	if (0 == g_ascii_strcasecmp(tag_str, "hr"))
 		return GGP_HTML_TAG_HR;
-	if (0 == strcmp(tag_str, "a"))
-		return GGP_HTML_TAG_IGNORED;
 	return GGP_HTML_TAG_UNKNOWN;
 }
diff --git a/libpurple/protocols/gg/html.h b/libpurple/protocols/gg/html.h
--- a/libpurple/protocols/gg/html.h
+++ b/libpurple/protocols/gg/html.h
@@ -6,7 +6,6 @@
 typedef enum
 {
 	GGP_HTML_TAG_UNKNOWN,
-	GGP_HTML_TAG_IGNORED,
 	GGP_HTML_TAG_EOM,
 	GGP_HTML_TAG_A,
 	GGP_HTML_TAG_B,
diff --git a/libpurple/protocols/gg/message-prpl.c b/libpurple/protocols/gg/message-prpl.c
--- a/libpurple/protocols/gg/message-prpl.c
+++ b/libpurple/protocols/gg/message-prpl.c
@@ -73,7 +73,7 @@ static void ggp_message_format_from_gg(g
 void ggp_message_setup_global(void)
 {
 	global_data.re_html_tag = g_regex_new(
-		"<(/)?([a-z]+)( [^>]+)?>",
+		"<(/)?([a-zA-Z]+)( [^>]+)?>",
 		G_REGEX_OPTIMIZE, 0, NULL);
 	global_data.re_gg_img = g_regex_new(
 		"<img name=\"([0-9a-fA-F]+)\"/?>",



More information about the Commits mailing list