diff options
author | Aki <please@ignore.pl> | 2020-08-08 15:03:55 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2020-08-08 15:03:55 +0200 |
commit | ffbe00d1106c29ec94640f7bbbe38f96a814cfb1 (patch) | |
tree | 258dab15fef10ed0a8294853f04d4a892e035d6b /viewhtml | |
parent | 1869fac40e4a35975f2e3713d37589225ae4866e (diff) | |
download | browse-ffbe00d1106c29ec94640f7bbbe38f96a814cfb1.zip browse-ffbe00d1106c29ec94640f7bbbe38f96a814cfb1.tar.gz browse-ffbe00d1106c29ec94640f7bbbe38f96a814cfb1.tar.bz2 |
Added support for // links
Diffstat (limited to 'viewhtml')
-rwxr-xr-x | viewhtml | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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" } |