[epiphany/gnome-3-30] ephy-embed-utils: Consider supported schemes for valid address checking
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-30] ephy-embed-utils: Consider supported schemes for valid address checking
- Date: Wed, 12 Sep 2018 11:55:25 +0000 (UTC)
commit 529a4e855428ffe72db6717c503cea731e3ae43d
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Mon Sep 10 19:54:31 2018 +0200
ephy-embed-utils: Consider supported schemes for valid address checking
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/90
embed/ephy-embed-utils.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 226c12c20..cda37d9b8 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -205,19 +205,25 @@ ephy_embed_utils_address_is_valid (const char *address)
{
char *scheme;
gboolean retval;
+ GAppInfo *info = NULL;
if (!address)
return FALSE;
scheme = g_uri_parse_scheme (address);
- retval = scheme ||
+ if (scheme != NULL) {
+ info = g_app_info_get_default_for_uri_scheme (scheme);
+ g_free (scheme);
+ }
+
+ retval = info ||
ephy_embed_utils_address_is_existing_absolute_filename (address) ||
g_regex_match (get_non_search_regex (), address, 0, NULL) ||
is_public_domain (address) ||
is_bang_search (address);
- g_free (scheme);
+ g_clear_object (&info);
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]