summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2023-03-14 21:21:22 -0500
committerPatrick Griffis <tingping@tingping.se>2023-03-14 21:22:01 -0500
commitc48afe3799e648e0ded2bf07deeb082028b6c5ac (patch)
tree0349fa245f9d70d5468d5072196fba1044344bde /src
parent7b093eea917374cb7b11fdfb9a332f4a61b789fb (diff)
Be even more picky about invalid URLs
Diffstat (limited to 'src')
-rw-r--r--src/fe-gtk/fe-gtk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index 38e6172d..125ab577 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -1065,8 +1065,7 @@ uri_contains_forbidden_characters (const char *uri)
 {
 	while (*uri)
 	{
-		/* This is not an exhaustive list, the full URI has segments that allow characters like "[]:" for example. */
-		if (strchr ("`<> ${}\"+", *uri) != NULL || (*uri & 0x80) /* non-ascii */)
+		if (!g_ascii_isalnum (*uri) && !strchr ("-._~:/?#[]@!$&'()*+,;=", *uri))
 			return TRUE;
 		uri++;
 	}