summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Finke <jens@triq.net>2002-03-05 20:25:15 +0000
committerJens Finke <jens@src.gnome.org>2002-03-05 20:25:15 +0000
commit4d6ca7410f79b3fb6682e435f4e60764b98fb067 (patch)
treef8f1f481e5b270c490dbaf71be331e53f6a656b9
parent562a2917114def9f4dec3ca071de7648c999a00e (diff)
downloadnautilus-4d6ca7410f79b3fb6682e435f4e60764b98fb067.tar.gz
Escape '!' character in URIs before using it as a moniker string.
2002-03-05 Jens Finke <jens@triq.net> * components/adapter/nautilus-adapter-stream-load-strategy.c (nautilus_adapter_stream_load_strategy_load_location): Escape '!' character in URIs before using it as a moniker string.
-rw-r--r--ChangeLog6
-rw-r--r--components/adapter/nautilus-adapter-stream-load-strategy.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f547fb83..18dd55cca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-05 Jens Finke <jens@triq.net>
+
+ * components/adapter/nautilus-adapter-stream-load-strategy.c
+ (nautilus_adapter_stream_load_strategy_load_location): Escape '!'
+ character in URIs before using it as a moniker string.
+
2002-03-05 Anders Carlsson <andersca@gnu.org>
* libnautilus-private/nautilus-global-preferences.c
diff --git a/components/adapter/nautilus-adapter-stream-load-strategy.c b/components/adapter/nautilus-adapter-stream-load-strategy.c
index d3e864164..13361f568 100644
--- a/components/adapter/nautilus-adapter-stream-load-strategy.c
+++ b/components/adapter/nautilus-adapter-stream-load-strategy.c
@@ -38,6 +38,7 @@
#include <gtk/gtkobject.h>
#include <eel/eel-gtk-macros.h>
#include <libnautilus/nautilus-view.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
struct NautilusAdapterStreamLoadStrategyDetails {
Bonobo_PersistStream persist_stream;
@@ -122,6 +123,7 @@ nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy
Bonobo_Stream stream;
CORBA_Environment ev;
char *moniker_str;
+ char *escaped_uri;
strategy = NAUTILUS_ADAPTER_STREAM_LOAD_STRATEGY (abstract_strategy);
g_object_ref (strategy);
@@ -129,10 +131,15 @@ nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy
CORBA_exception_init (&ev);
nautilus_adapter_load_strategy_report_load_underway (abstract_strategy);
-
- moniker_str = g_strconcat ("vfs:", uri, NULL);
+
+ /* We must escape the '!' in the URI here, because it is
+ * used as argument delimiter within monikers.
+ */
+ escaped_uri = gnome_vfs_escape_set (uri, "!");
+ moniker_str = g_strconcat ("vfs:", escaped_uri, NULL);
stream = bonobo_get_object (moniker_str, "IDL:Bonobo/Stream:1.0", &ev);
g_free (moniker_str);
+ g_free (escaped_uri);
if (BONOBO_EX (&ev) || CORBA_Object_is_nil (stream, &ev)) {
nautilus_adapter_load_strategy_report_load_failed (abstract_strategy);