--- a/src/qtgui/rclmain_w.cpp
+++ b/src/qtgui/rclmain_w.cpp
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.12 2006-12-05 15:23:50 dockes Exp $ (C) 2005 J.F.Dockes";
+static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.13 2006-12-07 07:07:35 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -662,12 +662,13 @@
string fn = urltolocalpath(doc.url);
string url = url_encode(doc.url, 7);
-
+ string ipath = doc.ipath;
// Substitute %u (url) and %f (file name) inside prototype command
string ncmd;
map<char, string> subs;
- subs['u'] = string("'") + url + "'";
- subs['f'] = string("'") + fn + "'";
+ subs['u'] = escapeShell(url);
+ subs['f'] = escapeShell(fn);
+ subs['i'] = escapeShell(ipath);
pcSubst(cmd, ncmd, subs);
ncmd += " &";