diff options
-rw-r--r-- | embed/ephy-web-view.c | 19 | ||||
-rw-r--r-- | src/ephy-link.c | 7 |
2 files changed, 16 insertions, 10 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index db11f1f07..9da36edda 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1043,11 +1043,18 @@ ephy_web_view_load_request (EphyWebView *web_view, WebKitNetworkRequest *request) { WebKitWebFrame *main_frame; + const char *url; + char *effective_url; - g_return_if_fail(EPHY_IS_WEB_VIEW(web_view)); - g_return_if_fail(WEBKIT_IS_NETWORK_REQUEST(request)); + g_return_if_fail(EPHY_IS_WEB_VIEW(web_view)); + g_return_if_fail(WEBKIT_IS_NETWORK_REQUEST(request)); - main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(web_view)); + url = webkit_network_request_get_uri (request); + effective_url = ephy_embed_utils_normalize_address (url); + webkit_network_request_set_uri (request, effective_url); + g_free (effective_url); + + main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(web_view)); webkit_web_frame_load_request(main_frame, request); } @@ -1062,10 +1069,14 @@ void ephy_web_view_load_url (EphyWebView *view, const char *url) { + char *effective_url; + g_return_if_fail (EPHY_IS_WEB_VIEW (view)); g_return_if_fail (url); - webkit_web_view_open (WEBKIT_WEB_VIEW (view), url); + effective_url = ephy_embed_utils_normalize_address (url); + webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url); + g_free (effective_url); } /** diff --git a/src/ephy-link.c b/src/ephy-link.c index d6b226d65..49faa52ae 100644 --- a/src/ephy-link.c +++ b/src/ephy-link.c @@ -89,18 +89,13 @@ ephy_link_open (EphyLink *link, EphyLinkFlags flags) { EphyEmbed *new_embed = NULL; - char *effective_address; LOG ("ephy_link_open address \"%s\" parent-embed %p flags %u", address, embed, flags); - effective_address = ephy_embed_utils_normalize_address (address); - g_signal_emit (link, signals[OPEN_LINK], 0, - effective_address, embed, flags, + address, embed, flags, &new_embed); - g_free (effective_address); - return new_embed; } |