pidgin: d06861c0: encode urls passed to tinyurl

wabz at pidgin.im wabz at pidgin.im
Tue Apr 7 19:30:28 EDT 2009


-----------------------------------------------------------------
Revision: d06861c0233a08c48f31b253b29595bf9af87618
Ancestor: 5ab68ddb0251205f7ef97f4c280e65696cbd5ff2
Author: wabz at pidgin.im
Date: 2009-04-07T23:26:33
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d06861c0233a08c48f31b253b29595bf9af87618

Modified files:
        finch/plugins/gnttinyurl.c

ChangeLog: 

encode urls passed to tinyurl

-------------- next part --------------
============================================================
--- finch/plugins/gnttinyurl.c	6f8de2d3456aacd27432af69276fbae23ba8b148
+++ finch/plugins/gnttinyurl.c	6186128d0e8f9faa5ac1791fdba6b22a548367d8
@@ -293,9 +293,9 @@ static void received_msg(PurpleAccount *
 		cbdata->conv = conv;
 		tmp = purple_unescape_html((char *)iter->data);
 		if (g_ascii_strncasecmp(tmp, "http://", 7) && g_ascii_strncasecmp(tmp, "https://", 8)) {
-			url = g_strdup_printf("%shttp://%s", purple_prefs_get_string(PREF_URL), tmp);
+			url = g_strdup_printf("%shttp%%3A%%2F%%2F%s", purple_prefs_get_string(PREF_URL), purple_url_encode(tmp));
 		} else {
-			url = g_strdup_printf("%s%s", purple_prefs_get_string(PREF_URL), tmp);
+			url = g_strdup_printf("%s%s", purple_prefs_get_string(PREF_URL), purple_url_encode(tmp));
 		}
 		g_free(tmp);
 		purple_util_fetch_url(url, TRUE, "finch", FALSE, url_fetched, cbdata);


More information about the Commits mailing list