[Xfce4-commits] <midori:master> Shell quote URI passed to sokoke_spawn_program
Christian Dywan
noreply at xfce.org
Sun Oct 10 14:02:03 CEST 2010
Updating branch refs/heads/master
to 31dabca224e9248b494e1279010b1649885bda05 (commit)
from e74f89f8c23a474b85b1ffc675a6f164fa04631e (commit)
commit 31dabca224e9248b494e1279010b1649885bda05
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Oct 10 13:39:38 2010 +0200
Shell quote URI passed to sokoke_spawn_program
midori/sokoke.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/midori/sokoke.c b/midori/sokoke.c
index 5e7b9a6..e2babcc 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -443,16 +443,19 @@ sokoke_spawn_program (const gchar* command,
{
/* FIXME: Implement Hildon specific version */
gchar* uri_format;
+ gchar* argument_quoted;
gchar* command_ready;
gchar** argv;
if ((uri_format = strstr (command, "%u")))
uri_format[1] = 's';
+ argument_quoted = g_shell_quote (argument);
if (strstr (command, "%s"))
- command_ready = g_strdup_printf (command, argument);
+ command_ready = g_strdup_printf (command, argument_quoted);
else
- command_ready = g_strconcat (command, " ", argument, NULL);
+ command_ready = g_strconcat (command, " ", argument_quoted, NULL);
+ g_free (argument_quoted);
error = NULL;
if (!g_shell_parse_argv (command_ready, NULL, &argv, &error))
More information about the Xfce4-commits
mailing list