[epiphany] Fixed detected feed URL for relative URIs
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fixed detected feed URL for relative URIs
- Date: Mon, 7 Jun 2010 16:31:42 +0000 (UTC)
commit d8497bf4863991e470b35446347e55756d923cf7
Author: Frédéric Péters <fpeters 0d be>
Date: Fri Apr 23 12:13:53 2010 +0200
Fixed detected feed URL for relative URIs
Bug #609817
embed/ephy-web-view.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 70444bc..f5d1558 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1264,8 +1264,21 @@ do_hook_into_links (JSContextRef js_context, EphyWebView *web_view)
char *type = js_get_element_attribute (js_context, obj, "type");
char *title = js_get_element_attribute (js_context, obj, "title");
char *address = js_get_element_attribute (js_context, obj, "href");
+ SoupURI *feed_uri, *current_uri;
- g_signal_emit_by_name (web_view, "ge-feed-link", type, title, address);
+ feed_uri = soup_uri_new (address);
+ if (!feed_uri) {
+ current_uri = soup_uri_new (ephy_web_view_get_address (web_view));
+ feed_uri = soup_uri_new_with_base (current_uri, address);
+ soup_uri_free (current_uri);
+ }
+
+ if (feed_uri) {
+ g_free (address);
+ address = soup_uri_to_string (feed_uri, FALSE);
+ g_signal_emit_by_name (web_view, "ge-feed-link", type, title, address);
+ soup_uri_free (feed_uri);
+ }
g_free (type);
g_free (title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]