/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2020 the Claws Mail team and 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
const gchar *raw_url = g_object_get_data(G_OBJECT(textview->link_popup_menu),
"raw_url");
if (uri) {
- gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1);
- gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1);
- g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button",
- NULL);
+ if (textview_uri_security_check(textview, uri) == TRUE) {
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1);
+ g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button", NULL);
+ }
}
if (raw_url) {
gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), raw_url, -1);
gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), raw_url, -1);
- g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url",
- NULL);
+ g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url", NULL);
}
}