aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'uzbl-core.c')
-rw-r--r--uzbl-core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/uzbl-core.c b/uzbl-core.c
index f224c60..edb3e54 100644
--- a/uzbl-core.c
+++ b/uzbl-core.c
@@ -267,8 +267,14 @@ expand(const char *s, guint recurse) {
else if(recurse != 1 &&
etype == EXP_EXPR) {
mycmd = expand(ret, 1);
- g_spawn_command_line_sync(mycmd, &cmd_stdout, NULL, NULL, &err);
+ gchar *quoted = g_shell_quote(mycmd);
+ gchar *tmp = g_strdup_printf("%s %s",
+ uzbl.behave.shell_cmd?uzbl.behave.shell_cmd:"/bin/sh -c",
+ quoted);
+ g_spawn_command_line_sync(tmp, &cmd_stdout, NULL, NULL, &err);
g_free(mycmd);
+ g_free(quoted);
+ g_free(tmp);
if (err) {
g_printerr("error on running command: %s\n", err->message);