diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-11-04 21:45:21 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-11-04 21:45:21 (EDT) |
commit | 7f7c1b872f1181ec0deba520aedd435edaa6e2a8 (patch) | |
tree | 1db7faabeb8fc4922c7ff86d010a727f38ed1f5f /src | |
parent | 6ce08e85c12897806f0bbe0670994721ee588241 (diff) | |
download | marquee-7f7c1b872f1181ec0deba520aedd435edaa6e2a8.zip marquee-7f7c1b872f1181ec0deba520aedd435edaa6e2a8.tar.gz marquee-7f7c1b872f1181ec0deba520aedd435edaa6e2a8.tar.bz2 |
mq_web_view_normal_scheme_methods.display_uri(): Hide query of about-scheme URIs
Diffstat (limited to 'src')
-rw-r--r-- | src/web-view-schemes/normal.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/web-view-schemes/normal.c b/src/web-view-schemes/normal.c index c4d42b8..3a2313e 100644 --- a/src/web-view-schemes/normal.c +++ b/src/web-view-schemes/normal.c @@ -87,8 +87,16 @@ static gchar * display_uri(MqWebView G_GNUC_UNUSED *web_view, MqWebViewScheme G_GNUC_UNUSED *scheme, const gchar *uri) { + gchar *rw_uri; + gchar *query; + if (g_str_has_prefix(uri, "mq-about:")) { - return g_strconcat("about:", uri + strlen("mq-about:"), NULL); + rw_uri = g_strconcat("about:", uri + strlen("mq-about:"), NULL); + query = strchr(rw_uri, '?'); + if (query) { + query[0] = '\0'; + } + return rw_uri; } else { return g_strdup(uri); } |