aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils.vala
diff options
context:
space:
mode:
authorJuhani Krekelä2023-08-27 15:38:38 +0300
committerWolfgang Müller2023-08-27 15:39:07 +0200
commit39b2c7e8c41945ea95ffd51791cc18490bc73875 (patch)
tree328f359511e535751f4ecaddfe2395493302ea8b /utils.vala
parenta2ab0abdbb2d98cc9f458c03213bc22cdc77d6db (diff)
downloadweltschmerz-39b2c7e8c41945ea95ffd51791cc18490bc73875.tar.gz
Fully support gopher:// and rtmp://
Currently these protocols are supported for recognition of links in text, but not for correctly normalizing them in OSC 8 links. Handle them for OSC 8 links too.
Diffstat (limited to '')
-rw-r--r--utils.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils.vala b/utils.vala
index 715e0b8..fad152e 100644
--- a/utils.vala
+++ b/utils.vala
@@ -22,7 +22,11 @@ class Utils {
if (u == null)
u = uri;
- if (u.has_prefix("ftp://") || u.has_prefix("http://") || u.has_prefix("https://")) {
+ if (u.has_prefix("ftp://") ||
+ u.has_prefix("gopher://") ||
+ u.has_prefix("http://") ||
+ u.has_prefix("https://") ||
+ u.has_prefix("rtmp://")) {
int a = u.index_of("/", 0) + 2; // character after second slash
int b = u.index_of("/", a); // next slash after hostname...
if (b < 0)