1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
$NetBSD: patch-aa,v 1.1 2007/08/23 09:24:57 martti Exp $
Patch for http://bugzilla.xfce.org/show_bug.cgi?id=3383
--- helpers/balsa.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/balsa.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=balsa
X-Terminal-Category=MailReader
-X-Terminal-Command=%B -m "mailto:%u"
+X-Terminal-Command=%B -m mailto:%u
--- helpers/epiphany.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/epiphany.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=epiphany;
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B "%u"
+X-Terminal-Command=%B %u
--- helpers/evolution.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/evolution.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=evolution-2.2;evolution-2.0;evolution-1.6;evolution-1.5;evolution-1.4;evolution;
X-Terminal-Category=MailReader
-X-Terminal-Command=%B "mailto:%u"
+X-Terminal-Command=%B mailto:%u
--- helpers/exo-open-browser.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/exo-open-browser.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=exo-open
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B --launch WebBrowser "%u"
+X-Terminal-Command=%B --launch WebBrowser %u
--- helpers/exo-open-mailer.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/exo-open-mailer.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=exo-open
X-Terminal-Category=MailReader
-X-Terminal-Command=%B --launch MailReader "%u"
+X-Terminal-Command=%B --launch MailReader %u
--- helpers/firefox.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/firefox.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=firefox;firefox-gtk2;firefox-gtk;mozilla-firefox;
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B -remote "openURL(%u)" || %B "%u"
+X-Terminal-Command=%B -remote openURL\(%u\) || %B %u
--- helpers/galeon.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/galeon.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=galeon;
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B "%u"
+X-Terminal-Command=%B %u
--- helpers/kmail.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/kmail.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=kmail;
X-Terminal-Category=MailReader
-X-Terminal-Command=%B "%u"
+X-Terminal-Command=%B %u
--- helpers/konqueror.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/konqueror.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,6 +5,6 @@
Type=Application
X-Terminal-Binaries=konqueror;
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B "%u"
+X-Terminal-Command=%B %u
--- helpers/lynx.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/lynx.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=lynx;
X-Terminal-Category=WebBrowser
-X-Terminal-Command=Terminal -x %B "%u"
+X-Terminal-Command=Terminal -x %B %u
--- helpers/mozilla-browser.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/mozilla-browser.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=mozilla;mozilla-gtk2;mozilla-gtk;
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B -remote "openURL(%u,new-window)" || %B "%u"
+X-Terminal-Command=%B -remote openURL\(%u,new-window\) || %B %u
--- helpers/mozilla-mailer.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/mozilla-mailer.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=mozilla;mozilla-gtk2;mozilla-gtk;
X-Terminal-Category=MailReader
-X-Terminal-Command=%B -remote "mailto(%u)" || %B -compose "mailto:%u"
+X-Terminal-Command=%B -remote mailto\(%u\) || %B -compose mailto:%u
--- helpers/mutt.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/mutt.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=mutt;
X-Terminal-Category=MailReader
-X-Terminal-Command=Terminal -x %B "%u"
+X-Terminal-Command=Terminal -x %B %u
--- helpers/opera-browser.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/opera-browser.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=opera;
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B -remote "openURL(%u,new-window)" || %B "%u"
+X-Terminal-Command=%B -remote openURL\(%u,new-window\) || %B %u
--- helpers/opera-mailer.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/opera-mailer.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=opera;
X-Terminal-Category=MailReader
-X-Terminal-Command=%B -remote "openURL(mailto:%u)" || %B "mailto:%u"
+X-Terminal-Command=%B -remote openURL\(mailto:%u\) || %B mailto:%u
--- helpers/sensible-browser.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/sensible-browser.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=sensible-browser
X-Terminal-Category=WebBrowser
-X-Terminal-Command=%B "%u"
+X-Terminal-Command=%B %u
--- helpers/sylpheed-claws.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/sylpheed-claws.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -7,4 +7,4 @@
StartupNotify=true
X-Terminal-Binaries=sylpheed-claws;
X-Terminal-Category=MailReader
-X-Terminal-Command=%B --compose "%u"
+X-Terminal-Command=%B --compose %u
--- helpers/thunderbird.desktop.in 2007-01-20 16:30:46.000000000 +0200
+++ Terminal-0.2.6.patched/helpers/thunderbird.desktop.in 2007-08-14 09:12:57.000000000 +0300
@@ -5,4 +5,4 @@
Type=Application
X-Terminal-Binaries=thunderbird;thunderbird-gtk2;thunderbird-gtk;mozilla-thunderbird;
X-Terminal-Category=MailReader
-X-Terminal-Command=%B -remote "mailto(%u)" || %B -compose "mailto:%u"
+X-Terminal-Command=%B -remote mailto\(%u\) || %B -compose mailto:%u
--- terminal/terminal-helper.c 2007-01-20 16:30:51.000000000 +0200
+++ Terminal-0.2.6.patched/terminal/terminal-helper.c 2007-08-14 09:17:20.000000000 +0300
@@ -349,6 +349,8 @@
gchar *argv[4];
gchar *command;
gchar *t;
+ gchar *escaped;
+ gchar **parts;
guint n;
g_return_if_fail (TERMINAL_IS_HELPER (helper));
@@ -359,6 +361,12 @@
if (s[0] == '%' && g_ascii_tolower (s[1]) == 'u')
++n;
+ parts = g_strsplit (uri, "$", 0);
+
+ escaped = g_shell_quote (g_strjoinv("\$", parts));
+
+ g_strfreev (parts);
+
if (n > 0)
{
command = g_new (gchar, strlen (helper->command) + n * strlen (uri) + 1);
@@ -366,7 +374,7 @@
{
if (s[0] == '%' && g_ascii_tolower (s[1]) == 'u')
{
- for (u = uri; *u != '\0'; )
+ for (u = escaped; *u != '\0'; )
*t++ = *u++;
s += 2;
}
@@ -379,9 +387,11 @@
}
else
{
- command = g_strconcat (helper->command, " ", uri, NULL);
+ command = g_strconcat (helper->command, " ", escaped, NULL);
}
+ g_free (escaped);
+
argv[0] = "/bin/sh";
argv[1] = "-c";
argv[2] = command;
|