diff options
author | portix <portix@gmx.net> | 2013-02-08 00:19:41 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2013-02-08 00:19:41 +0100 |
commit | 88074c24dbcaf5faf6749c915729683056a9d48a (patch) | |
tree | ef57532092cdb84f2139f898798965e94bb85dd7 /src/dwb.c | |
parent | 97c4fd5a2544059a3d4c0eb1022b543746979caa (diff) | |
download | dwb-88074c24dbcaf5faf6749c915729683056a9d48a.zip |
Allow arbitrary uri schemes from commandline/open-prompt
Diffstat (limited to 'src/dwb.c')
-rw-r--r-- | src/dwb.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -2469,10 +2469,17 @@ dwb_load_uri(GList *gl, const char *arg) else { if ( g_str_has_prefix(tmpuri, "http://") || g_str_has_prefix(tmpuri, "https://")) - uri = g_strdup(tmpuri); + { + webkit_web_view_load_uri(web, tmpuri); + goto clean; + } else if (strchr(tmpuri, ' ')) uri = dwb_get_searchengine(tmpuri); - + else if (g_regex_match_simple("^[a-z]+://", tmpuri, G_REGEX_CASELESS, 0)) + { + webkit_web_view_load_uri(web, tmpuri); + goto clean; + } #ifdef WITH_LIBSOUP_2_38 else if (dwb.misc.dns_lookup) { |