From ffbe00d1106c29ec94640f7bbbe38f96a814cfb1 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 8 Aug 2020 15:03:55 +0200 Subject: Added support for // links --- viewhtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'viewhtml') diff --git a/viewhtml b/viewhtml index 44d0f39..80eea55 100755 --- a/viewhtml +++ b/viewhtml @@ -43,8 +43,10 @@ proc makeAddress {address} { global baseAddress if {1 == [regexp {^https?.*} $address]} { return "$address" - } elseif {1 == [regexp {^/.*} $address]} { + } elseif {1 == [regexp {^/[^/].*} $address]} { return "[regsub {(https?://[^/]+)/.*} $baseAddress {\1}]$address" + } elseif {1 == [regexp {^//.*} $address]} { + return "https:$address" } else { return "$baseAddress$address" } -- cgit v1.1