about summary refs log tree commit diff stats
path: root/xxxterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xxxterm.c')
-rw-r--r--xxxterm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 3be93d9..e78b14f 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -41,6 +41,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <libgen.h>
+#include <ctype.h>
 
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1156,6 +1157,13 @@ load_uri(WebKitWebView *wv, gchar *uri)
 	if (uri == NULL || !strlen(uri))
 		return;
 
+	/* Strip leading spaces. */
+	while(*uri && isspace(*uri))
+		uri++;
+
+	if (!strlen(uri))
+		return;
+
 	if (valid_url_type(uri)) {
 		newuri = guess_url_type(uri);
 		uri = newuri;
avabit.com> 2010-01-13 05:51:27 +0100 committer hut <hut@lavabit.com> 2010-01-13 05:51:27 +0100 updated pydoc documentation' href='/akspecs/ranger/commit/doc/pydoc/ranger.defaults.options.html?h=v1.9.0&id=b3556b21e23eb3381b220e0d3319d94b3a89e0ac'>b3556b21 ^
f07bb12f ^




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