aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-01-09 21:54:24 +0800
committerCarlos Garcia Campos <cgarcia@igalia.com>2013-01-11 16:30:06 +0800
commit148238b49a703b0b3c971a3ae7d430d44a20693a (patch)
treeb9567aee5285a6fc01b95283f13b74c52484a839
parentbe49b7a2e25a6e6f6941240d9f9a5542c34ffd95 (diff)
downloadgsoc2013-epiphany-148238b49a703b0b3c971a3ae7d430d44a20693a.tar
gsoc2013-epiphany-148238b49a703b0b3c971a3ae7d430d44a20693a.tar.gz
gsoc2013-epiphany-148238b49a703b0b3c971a3ae7d430d44a20693a.tar.bz2
gsoc2013-epiphany-148238b49a703b0b3c971a3ae7d430d44a20693a.tar.lz
gsoc2013-epiphany-148238b49a703b0b3c971a3ae7d430d44a20693a.tar.xz
gsoc2013-epiphany-148238b49a703b0b3c971a3ae7d430d44a20693a.tar.zst
gsoc2013-epiphany-148238b49a703b0b3c971a3ae7d430d44a20693a.zip
ephy-web-view: Strip the query from the URL for about:applications
When a web application is deleted from about:applications, the form submitted reloads the page adding hidden fields to the URI. https://bugzilla.gnome.org/show_bug.cgi?id=691417
-rw-r--r--embed/ephy-web-view.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index d96d4fe90..9b096ae09 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2087,6 +2087,17 @@ ephy_web_view_location_changed (EphyWebView *view,
ephy_web_view_set_title (view, EMPTY_PAGE);
} else if (g_str_has_prefix (location, EPHY_ABOUT_SCHEME)) {
char *new_address = g_strdup_printf ("about:%s", location + EPHY_ABOUT_SCHEME_LEN + 1);
+
+ if (g_str_has_prefix (new_address, "about:applications")) {
+ SoupURI *uri = soup_uri_new (new_address);
+
+ /* Strip the query from the URL for about:applications. */
+ soup_uri_set_query (uri, NULL);
+ g_free (new_address);
+
+ new_address = soup_uri_to_string (uri, FALSE);
+ soup_uri_free (uri);
+ }
ephy_web_view_set_address (view, new_address);
g_free (new_address);
} else {