From 39b2c7e8c41945ea95ffd51791cc18490bc73875 Mon Sep 17 00:00:00 2001 From: Juhani Krekelä Date: Sun, 27 Aug 2023 15:38:38 +0300 Subject: 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. --- utils.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'utils.vala') 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) -- cgit v1.2.3-2-gb3c3