diff options
-rw-r--r-- | src/tab-body.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tab-body.c b/src/tab-body.c index 4f46a9e..f0c0b37 100644 --- a/src/tab-body.c +++ b/src/tab-body.c @@ -20,6 +20,7 @@ */ #include <stdlib.h> +#include <string.h> #include <gtk/gtk.h> #include <webkit2/webkit2.h> @@ -473,13 +474,21 @@ MqTabBody * mq_tab_body_new(MqTab *tab, const gchar *uri) { MqTabBody *body; + gchar *rw_uri; body = malloc(sizeof(*body)); body->tab = tab; body->web_view = WEBKIT_WEB_VIEW(webkit_web_view_new()); - if (uri) { - webkit_web_view_load_uri(body->web_view, uri); + + if (uri && g_str_has_prefix(uri, "about:")) { + rw_uri = g_strconcat("mq-about:", uri + strlen("about:"), NULL); + } else { + rw_uri = g_strdup(uri); + } + if (rw_uri) { + webkit_web_view_load_uri(body->web_view, rw_uri); + g_free(rw_uri); } body->container = GTK_WIDGET(body->web_view); |