Fixed missed uri escaping for '+' (#152).
authorDaniel Carl <danielcarl@gmx.de>
Fri, 21 Nov 2014 22:40:37 +0000 (23:40 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Fri, 21 Nov 2014 22:40:37 +0000 (23:40 +0100)
src/shortcut.c

index af8eab4..714765a 100644 (file)
@@ -83,7 +83,7 @@ char *shortcut_get_uri(const char *string)
     max_num = get_max_placeholder(tmpl);
     /* if there are only $0 placeholders we don't need to split the parameters */
     if (max_num == 0) {
-        quoted_param = soup_uri_encode(query, "&");
+        quoted_param = soup_uri_encode(query, "&+");
         uri          = util_str_replace("$0", quoted_param, tmpl);
         g_free(quoted_param);
 
@@ -140,7 +140,7 @@ char *shortcut_get_uri(const char *string)
         if (token->len) {
             char *new;
 
-            quoted_param = soup_uri_encode(token->str, "&");
+            quoted_param = soup_uri_encode(token->str, "&+");
             new = util_str_replace((char[]){'$', current_num + '0', '\0'}, quoted_param, uri);
             g_free(quoted_param);
             g_free(uri);