diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 9e75ded..5e0ab99 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -1423,6 +1423,7 @@ g_mount_spec_to_dav_uri (GMountSpec *spec)
   const char     *user;
   const char     *port;
   const char     *ssl;
+  char           *path;
   gint            port_num;
 
   host = g_mount_spec_get (spec, "host");
@@ -1441,12 +1442,17 @@ g_mount_spec_to_dav_uri (GMountSpec *spec)
     soup_uri_set_scheme (uri, SOUP_URI_SCHEME_HTTP);
 
   soup_uri_set_user (uri, user);
+  soup_uri_set_host (uri, host);
 
   if (port && (port_num = atoi (port)))
     soup_uri_set_port (uri, port_num);
 
-  soup_uri_set_host (uri, host);
-  soup_uri_set_path (uri, spec->mount_prefix);
+  path = g_uri_escape_string (spec->mount_prefix,
+			      G_URI_RESERVED_CHARS_ALLOWED_IN_PATH,
+			      FALSE);
+
+  g_free (uri->path);
+  uri->path = path;
 
   return uri;
 }
