summaryrefslogtreecommitdiff
path: root/browser.c
diff options
context:
space:
mode:
Diffstat (limited to 'browser.c')
-rw-r--r--browser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/browser.c b/browser.c
index ebab7fb..fc2d12a 100644
--- a/browser.c
+++ b/browser.c
@@ -12,6 +12,7 @@
#include <gio/gio.h>
#include <webkit2/webkit2.h>
#include <JavaScriptCore/JavaScript.h>
+#include "config.h"
void client_destroy(GtkWidget *, gpointer);
@@ -643,8 +644,12 @@ ensure_uri_scheme(const gchar *t)
f = g_strdup_printf("file://%s", fabs);
free(fabs);
}
- else
- f = g_strdup_printf("http://%s", t);
+ else {
+ if (g_str_has_prefix(f, "!/"))
+ f = g_strdup_printf(SEARCH_ENGINE, t + 2);
+ else
+ f = g_strdup_printf("http://%s", t);
+ }
return f;
}
else