aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-03-27 07:58:36 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-03-27 07:58:36 +0000
commit32688eed0d40561996b5a7c6eaee1547ddb609d8 (patch)
tree2041e3d16b4f619f2cd8ab7649f34e3f3d5a7639 /src
parent515a2e9b5a3aa00148eaf91b60c80f15fda313a5 (diff)
don't open in-page link of HTML mail.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3036 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/textview.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/textview.c b/src/textview.c
index f8286455..97234ac9 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -2176,7 +2176,7 @@ static gboolean textview_event_after(GtkWidget *widget, GdkEvent *event,
return FALSE;
uri = textview_get_uri(textview, &start, &end);
- if (!uri)
+ if (!uri || !uri->uri)
return FALSE;
if (!g_ascii_strncasecmp(uri->uri, "mailto:", 7)) {
@@ -2188,6 +2188,8 @@ static gboolean textview_event_after(GtkWidget *widget, GdkEvent *event,
if (ac && ac->protocol == A_NNTP)
ac = NULL;
compose_new(ac, msginfo->folder, uri->uri + 7, NULL);
+ } else if (uri->uri[0] == '#') {
+ /* don't open in-page link */
} else if (textview_uri_security_check(textview, uri) == TRUE)
open_uri(uri->uri, prefs_common.uri_cmd);
@@ -2369,7 +2371,7 @@ static void textview_populate_popup(GtkWidget *widget, GtkMenu *menu,
goto finish;
uri = textview_get_uri(textview, &start, &end);
- if (!uri)
+ if (!uri || !uri->uri)
goto finish;
separator = gtk_separator_menu_item_new();
@@ -2425,6 +2427,8 @@ static void textview_popup_menu_activate_open_uri_cb(GtkMenuItem *menuitem,
if (ac && ac->protocol == A_NNTP)
ac = NULL;
compose_new(ac, msginfo->folder, uri->uri + 7, NULL);
+ } else if (uri->uri[0] == '#') {
+ /* don't open in-page link */
} else if (textview_uri_security_check(textview, uri) == TRUE)
open_uri(uri->uri, prefs_common.uri_cmd);
}