diff options
author | Patrick Griffis <tingping@tingping.se> | 2023-03-14 21:21:22 -0500 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2023-03-14 21:22:01 -0500 |
commit | c48afe3799e648e0ded2bf07deeb082028b6c5ac (patch) | |
tree | 0349fa245f9d70d5468d5072196fba1044344bde /src/fe-gtk/fe-gtk.c | |
parent | 7b093eea917374cb7b11fdfb9a332f4a61b789fb (diff) |
Be even more picky about invalid URLs
Diffstat (limited to 'src/fe-gtk/fe-gtk.c')
-rw-r--r-- | src/fe-gtk/fe-gtk.c | 3 |
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++; } |