aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarfraaz Ahmed <asarfraaz@novell.com>2005-09-30 19:20:50 +0800
committerAhmed Sarfraaz <sarfraaz@src.gnome.org>2005-09-30 19:20:50 +0800
commit410ace5fad84c48973f381ad5ccd9d2e874c4ec2 (patch)
tree1e239ad9b5ed813c1a8bbc901b70170b5ab63bbb
parent9c2faea869197cbb5f223d923b9c0fadd814c361 (diff)
downloadgsoc2013-evolution-410ace5fad84c48973f381ad5ccd9d2e874c4ec2.tar.gz
gsoc2013-evolution-410ace5fad84c48973f381ad5ccd9d2e874c4ec2.tar.zst
gsoc2013-evolution-410ace5fad84c48973f381ad5ccd9d2e874c4ec2.zip
This now takes care to escape any auth mechanism in the uri.
2005-09-30 Sarfraaz Ahmed <asarfraaz@novell.com> * gui/component/addressbook.c (remove_parameters_from_uri) : This now takes care to escape any auth mechanism in the uri. svn path=/trunk/; revision=30438
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/gui/component/addressbook.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 7e50851ec3..9d642c2758 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-30 Sarfraaz Ahmed <asarfraaz@novell.com>
+
+ * gui/component/addressbook.c (remove_parameters_from_uri) : This now
+ takes care to escape any auth mechanism in the uri.
+
2005-09-30 Sushma Rai <rsushma@novell.com>
* importers/evolution-ldif-importer.c: Added some missing attrbutes and
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 989efb216a..289a783da4 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -27,6 +27,7 @@
#include <gtk/gtkmessagedialog.h>
#include <libgnome/gnome-i18n.h>
#include <libebook/e-book.h>
+#include <libedataserver/e-url.h>
#include <libedataserverui/e-passwords.h>
#include "e-util/e-error.h"
@@ -59,14 +60,13 @@ in uri*/
static gchar*
remove_parameters_from_uri (const gchar *uri)
{
- gchar **components;
- gchar *new_uri = NULL;
-
- components = g_strsplit (uri, ";", 2);
- if (components[0])
- new_uri = g_strdup (components[0]);
- g_strfreev (components);
- return new_uri;
+ char *euri_str;
+ EUri *euri;
+
+ euri = e_uri_new (uri);
+ euri_str = e_uri_to_string (euri, FALSE);
+ e_uri_free (euri);
+ return euri_str;
}
static void