pinosaur
/
surf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ca9421
)
Fix url parsing in load()
author
Quentin Rameau
<quinq@fifth.space>
Sat, 16 Apr 2016 04:19:13 +0000
(06:19 +0200)
committer
Quentin Rameau
<quinq@fifth.space>
Tue, 5 Jul 2016 11:01:56 +0000
(13:01 +0200)
surf.c
patch
|
blob
|
history
diff --git
a/surf.c
b/surf.c
index
9387859
..
3d6cc11
100644
(file)
--- a/
surf.c
+++ b/
surf.c
@@
-415,7
+415,10
@@
loaduri(Client *c, const Arg *a)
if (g_strcmp0(uri, "") == 0)
return;
- if (g_strrstr(uri, "://") || g_str_has_prefix(uri, "about:")) {
+ if (g_str_has_prefix(uri, "http://") ||
+ g_str_has_prefix(uri, "https://") ||
+ g_str_has_prefix(uri, "file://") ||
+ g_str_has_prefix(uri, "about:")) {
url = g_strdup(uri);
} else if (!stat(uri, &st) && (path = realpath(uri, NULL))) {
url = g_strdup_printf("file://%s", path);