summaryrefslogtreecommitdiff
path: root/src/dwb.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2013-02-08 00:19:41 +0100
committerportix <portix@gmx.net>2013-02-08 00:19:41 +0100
commit88074c24dbcaf5faf6749c915729683056a9d48a (patch)
treeef57532092cdb84f2139f898798965e94bb85dd7 /src/dwb.c
parent97c4fd5a2544059a3d4c0eb1022b543746979caa (diff)
downloaddwb-88074c24dbcaf5faf6749c915729683056a9d48a.zip
Allow arbitrary uri schemes from commandline/open-prompt
Diffstat (limited to 'src/dwb.c')
-rw-r--r--src/dwb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dwb.c b/src/dwb.c
index 0d8aeff9..8d9e97b0 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -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)
{