[hackers] [surf] Fix url parsing in load() || Quentin Rameau
commit 3530d18d8ed04710d5e5a0bfbf6af948c59549bf
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sat Apr 16 06:19:13 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Jul 5 13:01:56 2016 +0200
Fix url parsing in load()
diff --git a/surf.c b/surf.c
index 9387859..3d6cc11 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -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);
Received on Tue Jul 05 2016 - 13:02:32 CEST
This archive was generated by hypermail 2.3.0
: Tue Jul 05 2016 - 13:12:45 CEST