/pidgin/main: f161fc3074d1: Fix two edge-cases in handling comma...

Andrew Victor andrew.victor at mxit.com
Tue Nov 5 04:35:36 EST 2013


Changeset: f161fc3074d1f6228fe7b3878a44192c9229201a
Author:	 Andrew Victor <andrew.victor at mxit.com>
Date:	 2013-11-05 11:34 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/f161fc3074d1

Description:

Fix two edge-cases in handling command links:
 * "replymsg" field in named command contains URL-encoded text.
 * "selmsg" field is included, but empty.

diffstat:

 libpurple/protocols/mxit/formcmds.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff --git a/libpurple/protocols/mxit/formcmds.c b/libpurple/protocols/mxit/formcmds.c
--- a/libpurple/protocols/mxit/formcmds.c
+++ b/libpurple/protocols/mxit/formcmds.c
@@ -267,7 +267,7 @@ static void command_reply(struct RXMsgDa
 
 	if (nm) {		/* indicates response must be a structured response */
 		gchar*	seltext = g_markup_escape_text(purple_url_decode(selmsg), -1);
-		gchar*	replycmd = g_strdup_printf("type=reply|nm=%s|res=%s|err=0", nm, replymsg);
+		gchar*	replycmd = g_strdup_printf("type=reply|nm=%s|res=%s|err=0", nm, purple_url_decode(replymsg));
 
 		mxit_add_html_link( mx, replycmd, TRUE, seltext );
 
@@ -298,7 +298,7 @@ static void command_platformreq(GHashTab
 	char*	dest;
 
 	selmsg = g_hash_table_lookup(hash, "selmsg");			/* find the selection message */
-	if (selmsg) {
+	if (selmsg && (strlen(selmsg) > 0)) {
 		text = g_markup_escape_text(purple_url_decode(selmsg), -1);
 	}
 



More information about the Commits mailing list