Tue, 05 Nov 2013 11:34:56 +0200
Fix two edge-cases in handling command links:
* "replymsg" field in named command contains URL-encoded text.
* "selmsg" field is included, but empty.
| libpurple/protocols/mxit/formcmds.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/protocols/mxit/formcmds.c Tue Nov 05 10:39:31 2013 +0200 +++ b/libpurple/protocols/mxit/formcmds.c Tue Nov 05 11:34:56 2013 +0200 @@ -267,7 +267,7 @@ 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 @@ 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); }