aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-01-11 19:55:42 +0800
committerCarlos Garcia Campos <cgarcia@igalia.com>2013-01-11 19:55:42 +0800
commite0024b7841b206eb5fa6bdb553ffe7b8e56cf133 (patch)
treeb25ed7a021f1e4c70cb7d99a7ed835ab6f4ef3bc /embed/ephy-web-view.c
parentebe9853a9973d1bf07526089014ae4cabd17628d (diff)
downloadgsoc2013-epiphany-e0024b7841b206eb5fa6bdb553ffe7b8e56cf133.tar
gsoc2013-epiphany-e0024b7841b206eb5fa6bdb553ffe7b8e56cf133.tar.gz
gsoc2013-epiphany-e0024b7841b206eb5fa6bdb553ffe7b8e56cf133.tar.bz2
gsoc2013-epiphany-e0024b7841b206eb5fa6bdb553ffe7b8e56cf133.tar.lz
gsoc2013-epiphany-e0024b7841b206eb5fa6bdb553ffe7b8e56cf133.tar.xz
gsoc2013-epiphany-e0024b7841b206eb5fa6bdb553ffe7b8e56cf133.tar.zst
gsoc2013-epiphany-e0024b7841b206eb5fa6bdb553ffe7b8e56cf133.zip
ephy-web-view: Do not convert ephy-about URIs in ephy_web_view_location_changed()
We handle ephy-about URIs intetnally, they are converted to about: when needed.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index c70d9d497..f30d20a3c 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2065,19 +2065,15 @@ ephy_web_view_location_changed (EphyWebView *view,
if (location == NULL || location[0] == '\0') {
ephy_web_view_set_address (view, NULL);
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);
+ } else if (g_str_has_prefix (location, EPHY_ABOUT_SCHEME":applications")) {
+ SoupURI *uri = soup_uri_new (location);
+ char *new_address;
- 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);
+ new_address = soup_uri_to_string (uri, FALSE);
+ soup_uri_free (uri);
- /* 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 {