summaryrefslogtreecommitdiff
path: root/viewhtml
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2020-08-08 15:03:55 +0200
committerAki <please@ignore.pl>2020-08-08 15:03:55 +0200
commitffbe00d1106c29ec94640f7bbbe38f96a814cfb1 (patch)
tree258dab15fef10ed0a8294853f04d4a892e035d6b /viewhtml
parent1869fac40e4a35975f2e3713d37589225ae4866e (diff)
downloadbrowse-ffbe00d1106c29ec94640f7bbbe38f96a814cfb1.zip
browse-ffbe00d1106c29ec94640f7bbbe38f96a814cfb1.tar.gz
browse-ffbe00d1106c29ec94640f7bbbe38f96a814cfb1.tar.bz2
Added support for // links
Diffstat (limited to 'viewhtml')
-rwxr-xr-xviewhtml4
1 files changed, 3 insertions, 1 deletions
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"
}