diff options
author | Dan Winship <danw@src.gnome.org> | 2001-03-27 13:22:08 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-03-27 13:22:08 +0800 |
commit | 26b82892c72f977aa4602ddef20cca2cc4743e05 (patch) | |
tree | 12e14ca3308a7c8268c42857fce4f796d06d5c35 | |
parent | 6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7 (diff) | |
download | gsoc2013-evolution-26b82892c72f977aa4602ddef20cca2cc4743e05.tar gsoc2013-evolution-26b82892c72f977aa4602ddef20cca2cc4743e05.tar.gz gsoc2013-evolution-26b82892c72f977aa4602ddef20cca2cc4743e05.tar.bz2 gsoc2013-evolution-26b82892c72f977aa4602ddef20cca2cc4743e05.tar.lz gsoc2013-evolution-26b82892c72f977aa4602ddef20cca2cc4743e05.tar.xz gsoc2013-evolution-26b82892c72f977aa4602ddef20cca2cc4743e05.tar.zst gsoc2013-evolution-26b82892c72f977aa4602ddef20cca2cc4743e05.zip |
Fix parsing of params. (output_param): And unparsing...
* camel-url.c (camel_url_new_with_base): Fix parsing of params.
(output_param): And unparsing...
svn path=/trunk/; revision=8967
-rw-r--r-- | camel/camel-url.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/camel/camel-url.c b/camel/camel-url.c index 2777a3f32a..28f913495d 100644 --- a/camel/camel-url.c +++ b/camel/camel-url.c @@ -157,10 +157,10 @@ camel_url_new_with_base (CamelURL *base, const char *url_string) eq = memchr (cur, '=', p - cur); if (eq) { name = g_strndup (cur, eq - cur); - value = g_strndup (eq + 1, end - (eq + 1)); + value = g_strndup (eq + 1, p - (eq + 1)); camel_url_decode (value); } else { - name = g_strndup (cur, end - cur); + name = g_strndup (cur, p - cur); value = g_strdup (""); } camel_url_decode (name); @@ -369,6 +369,11 @@ output_param (GQuark key_id, gpointer data, gpointer user_data) enc = camel_url_encode (g_quark_to_string (key_id), FALSE, "?#"); g_string_sprintfa (str, ";%s", enc); g_free (enc); + if (*(char *)data) { + enc = camel_url_encode (data, FALSE, "?#"); + g_string_sprintfa (str, "=%s", enc); + g_free (enc); + } } /** |